×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Why do we have F2XM1?

QuietObserver (1029226) writes | more than 4 years ago

Intel 0

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

0 comment

Check for New Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...