Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndoni Arregi <andoni.arregui@gtd-gmbh.de>2022-02-09 16:52:07 +0300
committerCorinna Vinschen <corinna@vinschen.de>2022-02-10 17:59:14 +0300
commit8f2bd6f046cf2c7a6d7332bf056ebdb294077747 (patch)
treebd3e4e5a62fc122b7fc207faecb27ab5984afc13 /newlib/libm
parent1aec525a44f8aaa47030024a70c04a4dece23d3b (diff)
Fix expf overflow limit
Correct the overflow limit in the variable o_threshold to be consistent with the FLT_UWORD_LOG_MAX variable used by the internal implementation of the expf algorithm itself. The u_threshold variable has also been modified to be written in the same format. Note that this fix improves the situation but does not completely correct the inconsistencies regarding the overflow and underflow limits between the expf wrapper (wf_exp.c) and the expf algorithm itself (ef_exp.c). Currently these limits are different for the _FLT_LARGEST_EXPONENT_IS_NORMAL and _FLT_NO_DENORMALS cases as well as for the case where __OBSOLETE_MATH is not defined (only for the underflow limit in this case).
Diffstat (limited to 'newlib/libm')
-rw-r--r--newlib/libm/math/wf_exp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libm/math/wf_exp.c b/newlib/libm/math/wf_exp.c
index 38cacd95a..075b5bb0a 100644
--- a/newlib/libm/math/wf_exp.c
+++ b/newlib/libm/math/wf_exp.c
@@ -26,8 +26,8 @@ static const float
#else
static float
#endif
-o_threshold= 8.8721679688e+01, /* 0x42b17180 */
-u_threshold= -1.0397208405e+02; /* 0xc2cff1b5 */
+o_threshold= 0x1.62e42ep+06, /* 0x42b17217 */
+u_threshold= -0x1.9fe36ap+06; /* 0xc2cff1b5 */
#ifdef __STDC__
float expf(float x) /* wrapper expf */