What Determines the Default Setting of the x87 FPU Control Word?

Posted by Rick Regan on Stack Overflow See other posts from Stack Overflow or by Rick Regan
Published on 2010-03-31T15:00:32Z Indexed on 2010/03/31 15:03 UTC
Read the original article Hit count: 375

What determines the default setting of the x87 FPU control word -- specifically, the precision control field? Does the compiler set it based on the target processor? Is there a compiler option to change it?

Using Microsoft Visual C++ 2008 Express Edition on an Intel Core Duo processor, the default setting for the precision control field is "01b", meaning double (53 bit) precision. I'm wondering -- why is the default not "11"b, or extended (64 bit) precision?

(I know I can change it using _controlfp.)

© Stack Overflow or respective owner

Related posts about fpu

Related posts about floating-point