summaryrefslogtreecommitdiff
path: root/lib/libm/noieee_src/n_lgamma.c
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2008-07-18 13:08:59 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2008-07-18 13:08:59 +0000
commit6acacc3943a6dc8908ac6b973f4378ee0acf3332 (patch)
tree39f8797961e03ee22e557f3345439d3f8719dc26 /lib/libm/noieee_src/n_lgamma.c
parentdfc486d26aee2c046511e64309fc70bada685d45 (diff)
fix cases, found by lint:
- actually raise inexacts for expm1, and support - __exp__E always returns, because inexact check always succeeds. add NOTREACHED - some cases in lgamma FALLTHROUGH, as intended ok millert@
Diffstat (limited to 'lib/libm/noieee_src/n_lgamma.c')
-rw-r--r--lib/libm/noieee_src/n_lgamma.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libm/noieee_src/n_lgamma.c b/lib/libm/noieee_src/n_lgamma.c
index 1cf10a7c0d2..1fe70c44cc2 100644
--- a/lib/libm/noieee_src/n_lgamma.c
+++ b/lib/libm/noieee_src/n_lgamma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: n_lgamma.c,v 1.7 2008/07/16 15:25:51 martynas Exp $ */
+/* $OpenBSD: n_lgamma.c,v 1.8 2008/07/18 13:08:58 martynas Exp $ */
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -243,15 +243,15 @@ CONTINUE:
t = .5*t*t;
z = 1.0;
switch (x_int) {
- case 6: z = (y + 5);
- case 5: z *= (y + 4);
- case 4: z *= (y + 3);
+ case 6: z = (y + 5); /* FALLTHROUGH */
+ case 5: z *= (y + 4); /* FALLTHROUGH */
+ case 4: z *= (y + 3); /* FALLTHROUGH */
case 3: z *= (y + 2);
rr = __log__D(z);
rr.b += a0_lo; rr.a += a0_hi;
return(((r+rr.b)+t+rr.a));
case 2: return(((r+a0_lo)+t)+a0_hi);
- case 0: r -= log1p(x);
+ case 0: r -= log1p(x); /* FALLTHROUGH */
default: rr = __log__D(x);
rr.a -= a0_hi; rr.b -= a0_lo;
return(((r - rr.b) + t) - rr.a);
@@ -268,10 +268,10 @@ CONTINUE:
q = hi*t;
z = 1.0;
switch (x_int) {
- case 6: z = (y + 5);
- case 5: z *= (y + 4);
- case 4: z *= (y + 3);
- case 3: z *= (y + 2);
+ case 6: z = (y + 5); /* FALLTHROUGH */
+ case 5: z *= (y + 4); /* FALLTHROUGH */
+ case 4: z *= (y + 3); /* FALLTHROUGH */
+ case 3: z *= (y + 2); /* FALLTHROUGH */
rr = __log__D(z);
r += rr.b; r += q;
return(rr.a + r);