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

Side by Side Diff: fusl/src/math/nearbyint.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 <fenv.h> 1 #include <fenv.h>
2 #include <math.h> 2 #include <math.h>
3 #include "libm.h" 3 #include "libm.h"
4 4
5 /* nearbyint is the same as rint, but it must not raise the inexact exception */ 5 /* nearbyint is the same as rint, but it must not raise the inexact exception */
6 6
7 double nearbyint(double x) 7 double nearbyint(double x) {
8 {
9 #ifdef FE_INEXACT 8 #ifdef FE_INEXACT
10 » PRAGMA_STDC_FENV_ACCESS_ON 9 PRAGMA_STDC_FENV_ACCESS_ON
11 » int e; 10 int e;
12 11
13 » e = fetestexcept(FE_INEXACT); 12 e = fetestexcept(FE_INEXACT);
14 #endif 13 #endif
15 » x = rint(x); 14 x = rint(x);
16 #ifdef FE_INEXACT 15 #ifdef FE_INEXACT
17 » if (!e) 16 if (!e)
18 » » feclearexcept(FE_INEXACT); 17 feclearexcept(FE_INEXACT);
19 #endif 18 #endif
20 » return x; 19 return x;
21 } 20 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698