musl/include/float.h, branch master musl - an implementation of the standard library for Linux-based systems fix FLT_ROUNDS regression in C++ applications 2015年03月23日T15:26:51+00:00 Rich Felker dalias@aerifal.cx 2015年03月23日T15:26:51+00:00 11d1e2e2ded07673411ba872c1e3d0096dc79439 commit 559de8f5f06da9022cbba70e22e14a710eb74513 redefined FLT_ROUNDS to use an external function that can report the actual current rounding mode, rather than always reporting round-to-nearest. however, float.h did not include 'extern "C"' wrapping for C++, so C++ programs using FLT_ROUNDS ended up with an unresolved reference to a name-mangled C++ function __flt_rounds.
commit 559de8f5f06da9022cbba70e22e14a710eb74513 redefined FLT_ROUNDS
to use an external function that can report the actual current
rounding mode, rather than always reporting round-to-nearest. however,
float.h did not include 'extern "C"' wrapping for C++, so C++ programs
using FLT_ROUNDS ended up with an unresolved reference to a
name-mangled C++ function __flt_rounds.
fix FLT_ROUNDS to reflect the current rounding mode 2015年03月07日T17:05:28+00:00 Szabolcs Nagy nsz@port70.net 2015年03月07日T10:00:37+00:00 559de8f5f06da9022cbba70e22e14a710eb74513 Implemented as a wrapper around fegetround introducing a new function to the ABI: __flt_rounds. (fegetround cannot be used directly from float.h)
Implemented as a wrapper around fegetround introducing a new function
to the ABI: __flt_rounds. (fegetround cannot be used directly from float.h)
add C11 floating-point characteristic macros to float.h 2014年08月27日T06:54:01+00:00 Szabolcs Nagy nsz@port70.net 2014年08月27日T06:47:19+00:00 18dde0071334e2e7f71972b80df7779280c801cf C11 introduced *_DECIMAL_DIG and *_HAS_SUBNORM macros.
C11 introduced *_DECIMAL_DIG and *_HAS_SUBNORM macros.
write floating point limit constants to 21 significant decimal places 2013年11月20日T22:40:33+00:00 Rich Felker dalias@aerifal.cx 2013年11月20日T22:40:33+00:00 46db37289f917e23877a0e0df88cbb150805bc97 this is enough to produce the correct value even if the constant is interpreted as 80-bit extended precision, which matters on archs with excess precision (FLT_EVAL_METHOD==2) under at least some interpretations of the C standard. the shorter representations, while correct if converted to the nominal precision at translation time, could produce an incorrect value at extended precision, yielding results such as (double)DBL_MAX != DBL_MAX.
this is enough to produce the correct value even if the constant is
interpreted as 80-bit extended precision, which matters on archs with
excess precision (FLT_EVAL_METHOD==2) under at least some
interpretations of the C standard. the shorter representations, while
correct if converted to the nominal precision at translation time,
could produce an incorrect value at extended precision, yielding
results such as (double)DBL_MAX != DBL_MAX.
add FLT_TRUE_MIN, etc. macros from C11 2013年05月17日T22:38:42+00:00 Rich Felker dalias@aerifal.cx 2013年05月17日T22:38:42+00:00 22730d65608db06500cc6e0be4aaec03238f996b there was some question as to how many decimal places to use, since one decimal place is always sufficient to identify the smallest denormal uniquely. for now, I'm following the example in the C standard which is consistent with the other min/max macros we already had in place.
there was some question as to how many decimal places to use, since
one decimal place is always sufficient to identify the smallest
denormal uniquely. for now, I'm following the example in the C
standard which is consistent with the other min/max macros we already
had in place.
fix DECIMAL_DIG definitions 2012年03月21日T16:42:48+00:00 Rich Felker dalias@aerifal.cx 2012年03月21日T16:42:48+00:00 47db8903f61e20aba53adfc987dfb576d22a0b81 DECIMAL_DIG is not the same as LDBL_DIG type_DIG is the maximimum number of decimal digits that can survive a round trip from decimal to type and back to decimal. DECIMAL_DIG is the minimum number of decimal digits required in order for any floating point type to survive the round trip to decimal and back, and it is generally larger than LDBL_DIG. since the exact formula is non-trivial, and defining it larger than necessary may be legal but wasteful, just define the right value in bits/float.h.
DECIMAL_DIG is not the same as LDBL_DIG
type_DIG is the maximimum number of decimal digits that can survive a
round trip from decimal to type and back to decimal.
DECIMAL_DIG is the minimum number of decimal digits required in order
for any floating point type to survive the round trip to decimal and
back, and it is generally larger than LDBL_DIG. since the exact
formula is non-trivial, and defining it larger than necessary may be
legal but wasteful, just define the right value in bits/float.h.
initial check-in, version 0.5.0 2011年02月12日T05:22:29+00:00 Rich Felker dalias@aerifal.cx 2011年02月12日T05:22:29+00:00 0b44a0315b47dd8eced9f3b7f31580cf14bbfc01

AltStyle によって変換されたページ (->オリジナル) /