Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×
Intel

+ - 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 http://jheriko-rtw.blogspot.com/2009/04/why-do-we-have-f2xm1.html?showComment=1249084660633#c6336764748095052620

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

This discussion was created for logged-in users only, but now has been archived. No new comments can be posted.

Why do we have F2XM1?

Comments Filter:

The perversity of nature is nowhere better demonstrated by the fact that, when exposed to the same atmosphere, bread becomes hard while crackers become soft.

Working...