From a56841d6a986b966554a10e325178dd72b5406a4 Mon Sep 17 00:00:00 2001 From: martynas <> Date: Sat, 25 Jul 2009 11:38:09 +0000 Subject: [PATCH] int is big enough to fully represent exponents of all supported fp formats. which even for 80-bit & 128-bit long doubles is only 15 bits. therefore, scalbln, scalblnf, scalblnl are essentially the same as scalbn, scalbnf, scalbnl with bounds checking so that LONG_MIN..INT_MIN, and INT_MAX..LONG_MAX ranges properly raise exceptions & yield correct values. looks good to millert@ --- src/include/math.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/include/math.h b/src/include/math.h index a51e4d35..2d9d4333 100644 --- a/src/include/math.h +++ b/src/include/math.h @@ -1,4 +1,4 @@ -/* $OpenBSD: math.h,v 1.25 2009/04/08 23:09:50 martynas Exp $ */ +/* $OpenBSD: math.h,v 1.26 2009/07/25 11:38:09 martynas Exp $ */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -180,9 +180,7 @@ double log1p(double); double log2(double); double logb(double); double scalbn(double, int); -#if 0 double scalbln(double, long int); -#endif double cbrt(double); double hypot(double, double); @@ -288,9 +286,7 @@ float log2f(float); float logbf(float); float modff(float, float *); float scalbnf(float, int); -#if 0 float scalblnf(float, long int); -#endif float cbrtf(float); float fabsf(float); @@ -415,9 +411,7 @@ long double logbl(long double); long double modfl(long double, long double *); #endif long double scalbnl(long double, int); -#if 0 long double scalblnl(long double, long int); -#endif #if 0 long double cbrtl(long double);