News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Tiny reciprocal calculator.

Started by hutch--, September 11, 2018, 11:05:37 PM

Previous topic - Next topic

hutch--

This is a tiny toy that calculates the reciprocal of a number you type into the first text box. It cannot be built yet as I have not caught up with the documentation but its using simple SSE2 scalar double instructions to do a very simple calculation. The interface is a normal dialog.

aw27

There is RCPSS — Compute Reciprocal of Scalar Single-Precision Floating-Point Values (but there is no RCPSD — Compute Reciprocal of Scalar Double-Precision Floating-Point Values).
But there is VRCP28SD (Approximation to the Reciprocal of Scalar Double-Precision Floating-Point Value with Less Than 2^-28 Relative Error) for AVX-512

hutch--

That sounds typical but its easy enough to generate a reciprocal in the scalar instructions with a divide of 1 by the number and the speed should be reasonable. It obviously will not have the precision of the AVX version you have mentioned.