GNU Compiler Collection (GCC) Internals: Decimal float library routines |
---|
Next: Fixed-point fractional library routines, Previous: Soft float library routines, Up: Libgcc [Contents][Index]
The software decimal floating point library implements IEEE 754-2008 decimal floating point arithmetic and is only activated on selected targets.
The software decimal floating point library supports either DPD (Densely Packed Decimal) or BID (Binary Integer Decimal) encoding as selected at configure time.
These functions return the sum of a and b.
These functions return the difference between b and a; that is, a - b .
These functions return the product of a and b.
These functions return the quotient of a and b; that is, a / b .
These functions return the negation of a. They simply flip the sign bit, so they can produce negative zero and negative NaN.
These functions convert the value a from one decimal floating type to another.
These functions convert the value of a from a binary floating type to a decimal floating type of a different size.
These functions convert the value of a from a decimal floating type to a binary floating type of a different size.
These functions convert the value of a between decimal and binary floating types of the same size.
These functions convert a to a signed integer.
These functions convert a to a signed long.
These functions convert a to an unsigned integer. Negative values all become zero.
These functions convert a to an unsigned long. Negative values all become zero.
These functions convert i, a signed integer, to decimal floating point.
These functions convert i, a signed long, to decimal floating point.
These functions convert i, an unsigned integer, to decimal floating point.
These functions convert i, an unsigned long, to decimal floating point.
These functions return a nonzero value if either argument is NaN, otherwise 0.
There is also a complete group of higher level functions which correspond directly to comparison operators. They implement the ISO C semantics for floating-point comparisons, taking NaN into account. Pay careful attention to the return values defined for each set. Under the hood, all of these routines are implemented as
if (__bid_unordXd2 (a, b)) return E; return __bid_cmpXd2 (a, b);
where E is a constant chosen to give the proper behavior for NaN. Thus, the meaning of the return value is different for each set. Do not rely on this implementation; only the semantics documented below are guaranteed.
These functions return zero if neither argument is NaN, and a and b are equal.
These functions return a nonzero value if either argument is NaN, or if a and b are unequal.
These functions return a value greater than or equal to zero if neither argument is NaN, and a is greater than or equal to b.
These functions return a value less than zero if neither argument is NaN, and a is strictly less than b.
These functions return a value less than or equal to zero if neither argument is NaN, and a is less than or equal to b.
These functions return a value greater than zero if neither argument is NaN, and a is strictly greater than b.
Next: Fixed-point fractional library routines, Previous: Soft float library routines, Up: Libgcc [Contents][Index]