3.1.3. Floating-point model

There is an option to specify the floating-point model:

--fpmode model

Selects the target floating-point model.

model can be one of:


All facilities, operations, and representations guaranteed by the IEEE standard are available in single and double-precision. Modes of operation can be selected dynamically at runtime.

This defines the symbols:



IEEE standard with round-to-nearest and no inexact exception.

This defines the symbols:



IEEE standard with round-to-nearest and no exceptions. This mode is compatible with the Java floating-point arithmetic model.

This defines the symbol __FP_IEEE.


IEEE finite values with denormals flushed to zero, round-to-nearest and no exceptions. It is C and C++ compatible. This is the default option.

Finite values are as predicted by the IEEE standard. It is not guaranteed that NaNs and infinities are produced in all circumstances defined by the IEEE model, or that when they are produced, they have the same sign. Also, it is not guaranteed that the sign of zero is that predicted by the IEEE model.


Some value altering optimizations, where accuracy is sacrificed to fast execution. This is not IEEE compatible, and is not standard C.

This defines the symbol __FP_FAST.

Copyright © 2002-2005 ARM Limited. All rights reserved.ARM DUI 0204F