Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(880)

Side by Side Diff: fusl/src/math/nearbyintl.c

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/src/math/nearbyintf.c ('k') | fusl/src/math/nextafter.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #include <math.h>
2 #include <float.h>
3
4 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
5 long double nearbyintl(long double x)
6 {
7 return nearbyint(x);
8 }
9 #else
10 #include <fenv.h>
11 long double nearbyintl(long double x)
12 {
13 #ifdef FE_INEXACT
14 #pragma STDC FENV_ACCESS ON
15 int e;
16
17 e = fetestexcept(FE_INEXACT);
18 #endif
19 x = rintl(x);
20 #ifdef FE_INEXACT
21 if (!e)
22 feclearexcept(FE_INEXACT);
23 #endif
24 return x;
25 }
26 #endif
OLDNEW
« no previous file with comments | « fusl/src/math/nearbyintf.c ('k') | fusl/src/math/nextafter.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698