diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libm/noieee_src/n_atan2.c | 8 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_cbrt.c | 8 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_hypot.c | 10 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_sincos.c | 14 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_support.c | 8 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_tan.c | 8 |
6 files changed, 50 insertions, 6 deletions
diff --git a/lib/libm/noieee_src/n_atan2.c b/lib/libm/noieee_src/n_atan2.c index ee38ba9ce51..e7c39a80c06 100644 --- a/lib/libm/noieee_src/n_atan2.c +++ b/lib/libm/noieee_src/n_atan2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_atan2.c,v 1.17 2013/03/28 18:09:38 martynas Exp $ */ +/* $OpenBSD: n_atan2.c,v 1.18 2013/07/15 04:08:26 espie Exp $ */ /* $NetBSD: n_atan2.c,v 1.1 1995/10/10 23:36:37 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -127,6 +127,12 @@ static const double a10 = -4.4895863157820361210E-2; static const double a11 = 3.3006147437343875094E-2; static const double a12 = -1.4614844866464185439E-2; +float +atan2f(float x, float y) +{ + return (float)atan2((double)x, (double)y); +} + double atan2(double y, double x) { diff --git a/lib/libm/noieee_src/n_cbrt.c b/lib/libm/noieee_src/n_cbrt.c index 1d471079c0e..eb2c1e1eaac 100644 --- a/lib/libm/noieee_src/n_cbrt.c +++ b/lib/libm/noieee_src/n_cbrt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_cbrt.c,v 1.7 2012/12/05 23:20:03 deraadt Exp $ */ +/* $OpenBSD: n_cbrt.c,v 1.8 2013/07/15 04:08:26 espie Exp $ */ /* $NetBSD: n_cbrt.c,v 1.1 1995/10/10 23:36:40 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -59,6 +59,12 @@ static const double F= 45./28., G= 5./14.; +float +cbrtf(float x) +{ + return (float)cbrt((double) x); +} + double cbrt(double x) { diff --git a/lib/libm/noieee_src/n_hypot.c b/lib/libm/noieee_src/n_hypot.c index 2273b1f0a64..c4e35ba5ea8 100644 --- a/lib/libm/noieee_src/n_hypot.c +++ b/lib/libm/noieee_src/n_hypot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_hypot.c,v 1.3 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_hypot.c,v 1.4 2013/07/15 04:08:26 espie Exp $ */ /* $NetBSD: n_cabs.c,v 1.1 1995/10/10 23:36:39 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -89,6 +89,12 @@ static const double r2p1hi = 2.4142135623730950345E0; static const double r2p1lo = 1.4349369327986523769E-17; static const double sqrt2 = 1.4142135623730950622E0; +float +hypotf(float x, float y) +{ + return (float)hypot((double) x, (double) y); +} + double hypot(double x, double y) { @@ -142,6 +148,8 @@ hypot(double x, double y) else return(copysign(y,one)); /* y is INF */ } +__strong_alias(hypotl, hypot); + /* A faster but less accurate version of cabs(x,y) */ #if 0 double diff --git a/lib/libm/noieee_src/n_sincos.c b/lib/libm/noieee_src/n_sincos.c index df0961ee03d..e00114ad8c3 100644 --- a/lib/libm/noieee_src/n_sincos.c +++ b/lib/libm/noieee_src/n_sincos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_sincos.c,v 1.13 2013/03/28 18:09:38 martynas Exp $ */ +/* $OpenBSD: n_sincos.c,v 1.14 2013/07/15 04:08:26 espie Exp $ */ /* $NetBSD: n_sincos.c,v 1.1 1995/10/10 23:37:04 ragge Exp $ */ /* * Copyright (c) 1987, 1993 @@ -33,6 +33,12 @@ #include "mathimpl.h" +float +sinf(float x) +{ + return (float)sin((double) x); +} + double sin(double x) { @@ -64,6 +70,12 @@ sin(double x) __strong_alias(sinl, sin); +float +cosf(float x) +{ + return (float)cos((double) x); +} + double cos(double x) { diff --git a/lib/libm/noieee_src/n_support.c b/lib/libm/noieee_src/n_support.c index b61047d7094..aff227338e7 100644 --- a/lib/libm/noieee_src/n_support.c +++ b/lib/libm/noieee_src/n_support.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_support.c,v 1.22 2013/03/28 18:09:38 martynas Exp $ */ +/* $OpenBSD: n_support.c,v 1.23 2013/07/15 04:08:26 espie Exp $ */ /* $NetBSD: n_support.c,v 1.1 1995/10/10 23:37:06 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -239,6 +239,12 @@ drem(double x, double p) return remainder(x, p); } +float +sqrtf(float x) +{ + return (float)sqrt((double) x); +} + double sqrt(double x) { diff --git a/lib/libm/noieee_src/n_tan.c b/lib/libm/noieee_src/n_tan.c index 6e47b65834d..dfe2e476c9b 100644 --- a/lib/libm/noieee_src/n_tan.c +++ b/lib/libm/noieee_src/n_tan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_tan.c,v 1.13 2013/03/28 18:09:38 martynas Exp $ */ +/* $OpenBSD: n_tan.c,v 1.14 2013/07/15 04:08:26 espie Exp $ */ /* $NetBSD: n_tan.c,v 1.1 1995/10/10 23:37:07 ragge Exp $ */ /* * Copyright (c) 1987, 1993 @@ -33,6 +33,12 @@ #include "mathimpl.h" +float +tanf(float x) +{ + return (float)tan((double) x); +} + double tan(double x) { |