The MASM Forum

Microsoft 64 bit MASM => Tools & Toys => Topic started by: hutch-- on September 11, 2018, 11:05:37 PM

Title: Tiny reciprocal calculator.
Post by: hutch-- on September 11, 2018, 11:05:37 PM
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.
Title: Re: Tiny reciprocal calculator.
Post by: aw27 on September 14, 2018, 05:49:02 PM
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
Title: Re: Tiny reciprocal calculator.
Post by: hutch-- on September 15, 2018, 03:14:31 AM
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.