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:
Diffstat (limited to 'newlib/libm/mathfp/sf_frexp.c')
-rw-r--r--newlib/libm/mathfp/sf_frexp.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/newlib/libm/mathfp/sf_frexp.c b/newlib/libm/mathfp/sf_frexp.c
index 7f25195c8..c2751f65c 100644
--- a/newlib/libm/mathfp/sf_frexp.c
+++ b/newlib/libm/mathfp/sf_frexp.c
@@ -24,17 +24,6 @@ float frexpf (float d, int *exp)
float f;
__int32_t wf, wd;
- /* Check for special values. */
- switch (numtestf (d))
- {
- case NAN:
- case INF:
- errno = EDOM;
- case 0:
- *exp = 0;
- return (d);
- }
-
GET_FLOAT_WORD (wd, d);
/* Get the exponent. */
@@ -46,6 +35,16 @@ float frexpf (float d, int *exp)
SET_FLOAT_WORD (f, wf);
+ /* Check for special values. */
+ switch (numtestf (f))
+ {
+ case NAN:
+ case INF:
+ errno = EDOM;
+ *exp = 0;
+ return (f);
+ }
+
return (f);
}