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

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

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 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
OLDNEW
1 #include <math.h> 1 #include <math.h>
2 #include <float.h> 2 #include <float.h>
3 #include "libm.h" 3 #include "libm.h"
4 4
5 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 5 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
6 long double nearbyintl(long double x) 6 long double nearbyintl(long double x) {
7 { 7 return nearbyint(x);
8 » return nearbyint(x);
9 } 8 }
10 #else 9 #else
11 #include <fenv.h> 10 #include <fenv.h>
12 long double nearbyintl(long double x) 11 long double nearbyintl(long double x) {
13 {
14 #ifdef FE_INEXACT 12 #ifdef FE_INEXACT
15 » PRAGMA_STDC_FENV_ACCESS_ON 13 PRAGMA_STDC_FENV_ACCESS_ON
16 » int e; 14 int e;
17 15
18 » e = fetestexcept(FE_INEXACT); 16 e = fetestexcept(FE_INEXACT);
19 #endif 17 #endif
20 » x = rintl(x); 18 x = rintl(x);
21 #ifdef FE_INEXACT 19 #ifdef FE_INEXACT
22 » if (!e) 20 if (!e)
23 » » feclearexcept(FE_INEXACT); 21 feclearexcept(FE_INEXACT);
24 #endif 22 #endif
25 » return x; 23 return x;
26 } 24 }
27 #endif 25 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698