FPCE awareness

The pragmas of the previous section are just one feature of the proposed Floating-Point C Extensions. This section presents several others, not all of which will be available on all compilers in CommonPoint development environments.

Expression evaluation pragmas

Pragmas provide a mechanism for giving a compiler leeway to produce the most expeditious code for a platform. There is no guarantee that the compiler will exploit that freedom.

NOTE Use of types float_t and double_t for temporary variables and arguments to internal functions is a more portable mechanism to achieve the best code.

Hexadecimal loating constants

Hexadecimal floating constants clarify certain format-dependent constructs, but compilers not supporting FPCE probably don't support this useful feature.

NOTE Until wide adoption of FPCE, isolate hexadecimal floating constants in designated header files to expedite conversion to decimal, should it become necessary.

Efficiency of key macros

All CommonPoint platforms support the comparison macro functions such as IsLess and IsGreaterEqual. These macros match the built-in operators (< and >=) except that they don't raise the invalid flag when their operands are unordered.

NOTE All CommonPoint platforms and all systems supporting at least the FPCE function library will support the comparison macros. They'll be as fast as infix comparisons if the compiler is fully FPCE-aware.

Support for NaNs and infinities in I/O

In CommonPoint systems, the names kInfinity and kNaN are used for special floating-point values.

NOTE FPCE-aware compilers will also support the names INFINITY and NAN.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker