Quick Links:

bal | bbl | bdl | bsl

Component bdldfp_decimalplatform
[Package bdldfp]

Provide decimal floating-point platform information macros. More...

Outline
Purpose:
Provide decimal floating-point platform information macros.
Macros:
BDLDFP_DECIMALPLATFORM_C99_TR using C99 (C-language) decimal fp support
BDLDFP_DECIMALPLATFORM_INTELDFP using the IntelDFP library
BDLDFP_DECIMALPLATFORM_HARDWARE using hardware support for decimals
BDLDFP_DECIMALPLATFORM_SOFTWARE using software only (no hardware support)
BDLDFP_DECIMALPLATFORM_BIG_ENDIAN decimals are big endian
BDLDFP_DECIMALPLATFORM_LITTLE_ENDIAN decimals are little endian
BDLDFP_DECIMALPLATFORM_DPD using densely packed decimal representation
BDLDFP_DECIMALPLATFORM_BININT binary integer significand representation
BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE internal use only (remove)
BDLDFP_DECIMALPLATFORM_C99_QNAN* internal use only, will be removed
BDLDFP_DECIMALPLATFORM_C99_SNAN* internal use only, will be removed
See also:
Component bdldfp_decimal, Component bdldfp_decimalutil, Component bdldfp_decimalconvertutil
Description:
This component provides a suite of preprocessor macros that identify and define platform-specific compile-time attributes that are related to decimal floating-point support. The macros provided by this component are defined to the be non-zero (true) when enabled on a given platform, and are undefined on platforms where they are not enabled. Some macros are implentation details, providing platform-specific information that is not useful outside of the BDE implementation.
Macros Defining the Underlying Implementation:
Only one of these macros will be defined any supported platform:
BDLDFP_DECIMALPLATFORM_C99_TR - Full ISO/IEC TR 24732 support with library.
BDLDFP_DECIMALPLATFORM_INTELDFP - Using bdl+inteldfp as emulation
Macros Defining Hardware Support vs. Software Emulation:
Only one of these macros will be defined on any supported platform:
BDLDFP_DECIMALPLATFORM_HARDWARE - Hardware support for at least one type.
BDLDFP_DECIMALPLATFORM_SOFTWARE - Software emulation for all types
Endianness:
There is a chance that the endianness of integers and decimal floating point are not the same as those of integers; therefore we provide two macros here to support implementation of endianness conversions.
BDLDFP_DECIMALPLATFORM_BIG_ENDIAN - big endian storage
BDLDFP_DECIMALPLATFORM_LITTLE_ENDIAN - little endian storage
Encoding:
There are two IEEE-754 sanctioned encodings for the significand: densely packed decimal and binary integer significand. We provide two macros here to support implementation of encoding conversions.
BDLDFP_DECIMALPLATFORM_DPD - Densely Packed Decimal significand representation
BDLDFP_DECIMALPLATFORM_BININT - Binary Integer significand representation
Implementation Detail Macros:
These macros may or may not be present, depending on the platform. They are not meant for use outside of the Decimal Floating Point implementation; Therefore using them in your code will result in undefined behavior.
BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE - max chars to print Dec128
BDLDFP_DECIMALPLATFORM_C99_QNAN32 - The expression to get a quiet NaN of BDLDFP_DECIMALPLATFORM_C99_QNAN64 the type the number postfix refers to. BDLDFP_DECIMALPLATFORM_C99_QNAN128
BDLDFP_DECIMALPLATFORM_C99_SNAN32 - The expression to get a signaling NaN BDLDFP_DECIMALPLATFORM_C99_SNAN64 of the type the number postfix refers BDLDFP_DECIMALPLATFORM_C99_SNAN128 to.
Usage:
In this section, we show the intended usage of this component.