Forgot your password?

Submission Summary: 0 pending, 1 declined, 0 accepted (1 total, 0.00% accepted)


+ - Why do we have F2XM1?->

Submitted by QuietObserver
QuietObserver (1029226) writes "I was researching the Intel Floating Point instructions while working on a project, and I first came across F2XM1. I immediately wondered what the need was for an instruction that does 2 ^ x — 1 but has an input range of -1 to 1. I've tried researching the subject online, but all I've come up with is a reference from someone else who has the exact same question.

Quoted from

F2XM1 is a floating point assembler instruction for Intel CPUs. It is one of several which seem to be there to allow the calculation of several of the common "higher" functions, like pow(x, y) or log(x). However, I am always confused why it subtracts one after finding the power of 2 and why its limited from -1 to 1, since it doesn't seem to help anything much at all...

If anyone has any comments or suggestions about what use F2XM1 might have, and why Intel's FPU architecture also lacks an instruction to perform 2^x without subtracting anything (I know of at least one other FPU instruction set that does, and has no input range limitations)."
Link to Original Source

Things equal to nothing else are equal to each other.