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

Unified Diff: fusl/src/complex/catanl.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 side-by-side diff with in-line comments
Download patch
Index: fusl/src/complex/catanl.c
diff --git a/fusl/src/complex/catanl.c b/fusl/src/complex/catanl.c
index 5ace7704fdc086461216389aa83b980c161e2c3f..4a24ff578ff05a4565a797e40ab2d1ad9388ced9 100644
--- a/fusl/src/complex/catanl.c
+++ b/fusl/src/complex/catanl.c
@@ -62,9 +62,8 @@
#include "libm.h"
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
-long double complex catanl(long double complex z)
-{
- return catan(z);
+long double complex catanl(long double complex z) {
+ return catan(z);
}
#else
static const long double PIL = 3.141592653589793238462643383279502884197169L;
@@ -72,55 +71,53 @@ static const long double DP1 = 3.14159265358979323829596852490908531763125L;
static const long double DP2 = 1.6667485837041756656403424829301998703007e-19L;
static const long double DP3 = 1.8830410776607851167459095484560349402753e-39L;
-static long double redupil(long double x)
-{
- long double t;
- long i;
+static long double redupil(long double x) {
+ long double t;
+ long i;
- t = x / PIL;
- if (t >= 0.0L)
- t += 0.5L;
- else
- t -= 0.5L;
+ t = x / PIL;
+ if (t >= 0.0L)
+ t += 0.5L;
+ else
+ t -= 0.5L;
- i = t; /* the multiple */
- t = i;
- t = ((x - t * DP1) - t * DP2) - t * DP3;
- return t;
+ i = t; /* the multiple */
+ t = i;
+ t = ((x - t * DP1) - t * DP2) - t * DP3;
+ return t;
}
-long double complex catanl(long double complex z)
-{
- long double complex w;
- long double a, t, x, x2, y;
+long double complex catanl(long double complex z) {
+ long double complex w;
+ long double a, t, x, x2, y;
- x = creall(z);
- y = cimagl(z);
+ x = creall(z);
+ y = cimagl(z);
- if ((x == 0.0L) && (y > 1.0L))
- goto ovrf;
+ if ((x == 0.0L) && (y > 1.0L))
+ goto ovrf;
- x2 = x * x;
- a = 1.0L - x2 - (y * y);
- if (a == 0.0L)
- goto ovrf;
+ x2 = x * x;
+ a = 1.0L - x2 - (y * y);
+ if (a == 0.0L)
+ goto ovrf;
- t = atan2l(2.0L * x, a) * 0.5L;
- w = redupil(t);
+ t = atan2l(2.0L * x, a) * 0.5L;
+ w = redupil(t);
- t = y - 1.0L;
- a = x2 + (t * t);
- if (a == 0.0L)
- goto ovrf;
+ t = y - 1.0L;
+ a = x2 + (t * t);
+ if (a == 0.0L)
+ goto ovrf;
- t = y + 1.0L;
- a = (x2 + (t * t)) / a;
- w = w + (0.25L * logl(a)) * I;
- return w;
+ t = y + 1.0L;
+ a = (x2 + (t * t)) / a;
+ w = w + (0.25L * logl(a)) * I;
+ return w;
ovrf:
- // FIXME
- w = LDBL_MAX + LDBL_MAX * I;
- return w;
+ // FIXME
+ w = LDBL_MAX + LDBL_MAX * I;
+ return w;
}
#endif

Powered by Google App Engine
This is Rietveld 408576698