BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdldfp_decimalplatform

Macros

#define BDLDFP_DECIMALPLATFORM_SOFTWARE   1
 
#define BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE   256
 
#define BDLDFP_DECIMALPLATFORM_INTELDFP   1
 
#define BDLDFP_DECIMALPLATFORM_BININT   1
 
#define BDLDFP_DECIMALPLATFORM_COMPILER_ERROR   BSLMF_ASSERT(false)
 

Functions

 BSLMF_ASSERT (false)
 

Variables

 BDLDFP_DECIMALPLATFORM_COMPILER_ERROR
 

Detailed Description

Outline

Purpose

Provide decimal floating-point platform information macros.

Macros

See also
bdldfp_decimal, bdldfp_decimalutil, 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.

Macro Definition Documentation

◆ BDLDFP_DECIMALPLATFORM_BININT

#define BDLDFP_DECIMALPLATFORM_BININT   1

◆ BDLDFP_DECIMALPLATFORM_COMPILER_ERROR

#define BDLDFP_DECIMALPLATFORM_COMPILER_ERROR   BSLMF_ASSERT(false)

◆ BDLDFP_DECIMALPLATFORM_INTELDFP

#define BDLDFP_DECIMALPLATFORM_INTELDFP   1

◆ BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE

#define BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE   256

◆ BDLDFP_DECIMALPLATFORM_SOFTWARE

#define BDLDFP_DECIMALPLATFORM_SOFTWARE   1

Function Documentation

◆ BSLMF_ASSERT()

BSLMF_ASSERT ( false  )

Variable Documentation

◆ BDLDFP_DECIMALPLATFORM_COMPILER_ERROR

BDLDFP_DECIMALPLATFORM_COMPILER_ERROR