musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/include/float.h
AgeCommit message (Collapse)AuthorLines
2015年03月23日fix FLT_ROUNDS regression in C++ applications Rich Felker-0/+8
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.
2015年03月07日fix FLT_ROUNDS to reflect the current rounding mode Szabolcs Nagy-0/+3
Implemented as a wrapper around fegetround introducing a new function to the ABI: __flt_rounds. (fegetround cannot be used directly from float.h)
2014年08月27日add C11 floating-point characteristic macros to float.h Szabolcs Nagy-0/+7
C11 introduced *_DECIMAL_DIG and *_HAS_SUBNORM macros.
2013年11月20日write floating point limit constants to 21 significant decimal places Rich Felker-8/+8
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.
2013年05月17日add FLT_TRUE_MIN, etc. macros from C11 Rich Felker-0/+2
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.
2012年03月21日fix DECIMAL_DIG definitions Rich Felker-2/+0
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.
2011年02月12日initial check-in, version 0.5.0 v0.5.0 Rich Felker-0/+34
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月02日 20:54:40 +0000

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