Fri Oct 10 20:58:09 2014 UTC ()
Add a few missing weak aliases


(martin)
diff -r1.8 -r1.9 src/lib/libm/arch/vax/n_atan2.S
diff -r1.6 -r1.7 src/lib/libm/arch/vax/n_cabs.S
diff -r1.6 -r1.7 src/lib/libm/noieee_src/n_atan2.c
diff -r1.6 -r1.7 src/lib/libm/noieee_src/n_sincos.c
diff -r1.8 -r1.9 src/lib/libm/noieee_src/n_cosh.c
diff -r1.8 -r1.9 src/lib/libm/noieee_src/n_exp.c
diff -r1.7 -r1.8 src/lib/libm/noieee_src/n_log.c
diff -r1.7 -r1.8 src/lib/libm/noieee_src/n_sinh.c
diff -r1.9 -r1.10 src/lib/libm/noieee_src/n_pow.c

cvs diff -r1.8 -r1.9 src/lib/libm/arch/vax/n_atan2.S (expand / switch to unified diff)

--- src/lib/libm/arch/vax/n_atan2.S 2008/03/20 18:49:39 1.8
+++ src/lib/libm/arch/vax/n_atan2.S 2014/10/10 20:58:09 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: n_atan2.S,v 1.8 2008/03/20 18:49:39 mhitch Exp $ */ 1/* $NetBSD: n_atan2.S,v 1.9 2014/10/10 20:58:09 martin Exp $ */
2/* 2/*
3 * Copyright (c) 1985, 1993 3 * Copyright (c) 1985, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors 14 * 3. Neither the name of the University nor the names of its contributors
@@ -74,26 +74,27 @@ @@ -74,26 +74,27 @@
74 74
75#ifdef WEAK_ALIAS 75#ifdef WEAK_ALIAS
76WEAK_ALIAS(atan2f, _atan2f) 76WEAK_ALIAS(atan2f, _atan2f)
77#endif 77#endif
78 78
79ENTRY(_atan2f, 0) 79ENTRY(_atan2f, 0)
80 cvtfd 4(%ap),-(%sp) 80 cvtfd 4(%ap),-(%sp)
81 calls $2,_C_LABEL(_atan2) 81 calls $2,_C_LABEL(_atan2)
82 cvtdf %r0,%r0 82 cvtdf %r0,%r0
83 ret 83 ret
84 84
85#ifdef WEAK_ALIAS 85#ifdef WEAK_ALIAS
86WEAK_ALIAS(atan2, _atan2) 86WEAK_ALIAS(atan2, _atan2)
 87WEAK_ALIAS(_atan2l, _atan2)
87#endif 88#endif
88 89
89ENTRY(_atan2, 0x0fc0) 90ENTRY(_atan2, 0x0fc0)
90 movq 4(%ap),%r2 # %r2 = y 91 movq 4(%ap),%r2 # %r2 = y
91 movq 12(%ap),%r4 # %r4 = x 92 movq 12(%ap),%r4 # %r4 = x
92 bicw3 $0x7f,%r2,%r0 93 bicw3 $0x7f,%r2,%r0
93 bicw3 $0x7f,%r4,%r1 94 bicw3 $0x7f,%r4,%r1
94 cmpw %r0,$0x8000 # y is the reserved operand 95 cmpw %r0,$0x8000 # y is the reserved operand
95 jeql resop 96 jeql resop
96 cmpw %r1,$0x8000 # x is the reserved operand 97 cmpw %r1,$0x8000 # x is the reserved operand
97 jeql resop 98 jeql resop
98 subl2 $8,%sp 99 subl2 $8,%sp
99 bicw3 $0x7fff,%r2,-4(%fp) # copy y sign bit to -4(%fp) 100 bicw3 $0x7fff,%r2,-4(%fp) # copy y sign bit to -4(%fp)

cvs diff -r1.6 -r1.7 src/lib/libm/arch/vax/n_cabs.S (expand / switch to unified diff)

--- src/lib/libm/arch/vax/n_cabs.S 2008/03/20 16:41:26 1.6
+++ src/lib/libm/arch/vax/n_cabs.S 2014/10/10 20:58:09 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: n_cabs.S,v 1.6 2008/03/20 16:41:26 mhitch Exp $ */ 1/* $NetBSD: n_cabs.S,v 1.7 2014/10/10 20:58:09 martin Exp $ */
2/* 2/*
3 * Copyright (c) 1985, 1993 3 * Copyright (c) 1985, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors 14 * 3. Neither the name of the University nor the names of its contributors
@@ -45,26 +45,28 @@ @@ -45,26 +45,28 @@
45/* entry for c functions cabs and hypot */ 45/* entry for c functions cabs and hypot */
46#ifdef WEAK_ALIAS 46#ifdef WEAK_ALIAS
47WEAK_ALIAS(hypotf, _hypotf) 47WEAK_ALIAS(hypotf, _hypotf)
48#endif 48#endif
49 49
50ENTRY(_hypotf, 0) 50ENTRY(_hypotf, 0)
51 cvtfd 4(%ap),-(%sp) 51 cvtfd 4(%ap),-(%sp)
52 calls $2,_C_LABEL(_hypot) 52 calls $2,_C_LABEL(_hypot)
53 cvtdf %r0,%r0 53 cvtdf %r0,%r0
54 ret 54 ret
55 55
56#ifdef WEAK_ALIAS 56#ifdef WEAK_ALIAS
57WEAK_ALIAS(hypot, _hypot) 57WEAK_ALIAS(hypot, _hypot)
 58WEAK_ALIAS(hypotl, _hypot)
 59WEAK_ALIAS(_hypotl, _hypot)
58#endif 60#endif
59 61
60ALTENTRY(cabs) 62ALTENTRY(cabs)
61ENTRY(_hypot, 0x8040) # save %r6, enable floating overflow 63ENTRY(_hypot, 0x8040) # save %r6, enable floating overflow
62 movq 4(%ap),%r0 # %r0:1 = x 64 movq 4(%ap),%r0 # %r0:1 = x
63 movq 12(%ap),%r2 # %r2:3 = y 65 movq 12(%ap),%r2 # %r2:3 = y
64 jbr cabs2 66 jbr cabs2
65 67
66/* entry for Fortran use, call by: d = abs(z) */ 68/* entry for Fortran use, call by: d = abs(z) */
67ENTRY(z_abs, 0x8040) # save %r6, enable floating overflow 69ENTRY(z_abs, 0x8040) # save %r6, enable floating overflow
68 movl 4(%ap),%r2 # indirect addressing is necessary here 70 movl 4(%ap),%r2 # indirect addressing is necessary here
69 movq (%r2)+,%r0 # %r0:1 = x 71 movq (%r2)+,%r0 # %r0:1 = x
70 movq (%r2),%r2 # %r2:3 = y 72 movq (%r2),%r2 # %r2:3 = y

cvs diff -r1.6 -r1.7 src/lib/libm/noieee_src/n_atan2.c (expand / switch to unified diff)

--- src/lib/libm/noieee_src/n_atan2.c 2003/08/07 16:44:50 1.6
+++ src/lib/libm/noieee_src/n_atan2.c 2014/10/10 20:58:09 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: n_atan2.c,v 1.6 2003/08/07 16:44:50 agc Exp $ */ 1/* $NetBSD: n_atan2.c,v 1.7 2014/10/10 20:58:09 martin Exp $ */
2/* 2/*
3 * Copyright (c) 1985, 1993 3 * Copyright (c) 1985, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors 14 * 3. Neither the name of the University nor the names of its contributors
@@ -160,26 +160,30 @@ ic(a11, 1.6438029044759730479E-2 ,  @@ -160,26 +160,30 @@ ic(a11, 1.6438029044759730479E-2 ,
160#define a2 vccast(a2) 160#define a2 vccast(a2)
161#define a3 vccast(a3) 161#define a3 vccast(a3)
162#define a4 vccast(a4) 162#define a4 vccast(a4)
163#define a5 vccast(a5) 163#define a5 vccast(a5)
164#define a6 vccast(a6) 164#define a6 vccast(a6)
165#define a7 vccast(a7) 165#define a7 vccast(a7)
166#define a8 vccast(a8) 166#define a8 vccast(a8)
167#define a9 vccast(a9) 167#define a9 vccast(a9)
168#define a10 vccast(a10) 168#define a10 vccast(a10)
169#define a11 vccast(a11) 169#define a11 vccast(a11)
170#define a12 vccast(a12) 170#define a12 vccast(a12)
171#endif 171#endif
172 172
 173#ifdef __weak_alias
 174__weak_alias(_atan2l, atan2);
 175#endif
 176
173double 177double
174atan2(double y, double x) 178atan2(double y, double x)
175{ 179{
176 static const double zero=0, one=1, small=1.0E-9, big=1.0E18; 180 static const double zero=0, one=1, small=1.0E-9, big=1.0E18;
177 double t,z,signy,signx,hi,lo; 181 double t,z,signy,signx,hi,lo;
178 int k,m; 182 int k,m;
179 183
180#if !defined(__vax__)&&!defined(tahoe) 184#if !defined(__vax__)&&!defined(tahoe)
181 /* if x or y is NAN */ 185 /* if x or y is NAN */
182 if(x!=x) return(x); if(y!=y) return(y); 186 if(x!=x) return(x); if(y!=y) return(y);
183#endif /* !defined(__vax__)&&!defined(tahoe) */ 187#endif /* !defined(__vax__)&&!defined(tahoe) */
184 188
185 /* copy down the sign of y and x */ 189 /* copy down the sign of y and x */

cvs diff -r1.6 -r1.7 src/lib/libm/noieee_src/n_sincos.c (expand / switch to unified diff)

--- src/lib/libm/noieee_src/n_sincos.c 2003/08/07 16:44:52 1.6
+++ src/lib/libm/noieee_src/n_sincos.c 2014/10/10 20:58:09 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: n_sincos.c,v 1.6 2003/08/07 16:44:52 agc Exp $ */ 1/* $NetBSD: n_sincos.c,v 1.7 2014/10/10 20:58:09 martin Exp $ */
2/* 2/*
3 * Copyright (c) 1987, 1993 3 * Copyright (c) 1987, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors 14 * 3. Neither the name of the University nor the names of its contributors
@@ -28,26 +28,31 @@ @@ -28,26 +28,31 @@
28 * SUCH DAMAGE. 28 * SUCH DAMAGE.
29 */ 29 */
30 30
31#ifndef lint 31#ifndef lint
32#if 0 32#if 0
33static char sccsid[] = "@(#)sincos.c 8.1 (Berkeley) 6/4/93"; 33static char sccsid[] = "@(#)sincos.c 8.1 (Berkeley) 6/4/93";
34#endif 34#endif
35#endif /* not lint */ 35#endif /* not lint */
36 36
37#define _LIBM_DECLARE 37#define _LIBM_DECLARE
38#include "mathimpl.h" 38#include "mathimpl.h"
39#include "trig.h" 39#include "trig.h"
40 40
 41#ifdef __weak_alias
 42__weak_alias(_sinl, sin);
 43__weak_alias(_cosl, cos);
 44#endif
 45
41double 46double
42sin(double x) 47sin(double x)
43{ 48{
44 double a,c,z; 49 double a,c,z;
45 50
46 if(!finite(x)) /* sin(NaN) and sin(INF) must be NaN */ 51 if(!finite(x)) /* sin(NaN) and sin(INF) must be NaN */
47 return x-x; 52 return x-x;
48 x=drem(x,PI2); /* reduce x into [-PI,PI] */ 53 x=drem(x,PI2); /* reduce x into [-PI,PI] */
49 a=copysign(x,__one); 54 a=copysign(x,__one);
50 if (a >= PIo4) { 55 if (a >= PIo4) {
51 if(a >= PI3o4) /* ... in [3PI/4,PI] */ 56 if(a >= PI3o4) /* ... in [3PI/4,PI] */
52 x = copysign((a = PI-a),x); 57 x = copysign((a = PI-a),x);
53 else { /* ... in [PI/4,3PI/4] */ 58 else { /* ... in [PI/4,3PI/4] */

cvs diff -r1.8 -r1.9 src/lib/libm/noieee_src/n_cosh.c (expand / switch to unified diff)

--- src/lib/libm/noieee_src/n_cosh.c 2008/03/20 16:41:26 1.8
+++ src/lib/libm/noieee_src/n_cosh.c 2014/10/10 20:58:09 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: n_cosh.c,v 1.8 2008/03/20 16:41:26 mhitch Exp $ */ 1/* $NetBSD: n_cosh.c,v 1.9 2014/10/10 20:58:09 martin Exp $ */
2/* 2/*
3 * Copyright (c) 1985, 1993 3 * Copyright (c) 1985, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors 14 * 3. Neither the name of the University nor the names of its contributors
@@ -77,26 +77,27 @@ static char sccsid[] = "@(#)cosh.c 8.1 ( @@ -77,26 +77,27 @@ static char sccsid[] = "@(#)cosh.c 8.1 (
77 * Constants: 77 * Constants:
78 * The hexadecimal values are the intended ones for the following constants. 78 * The hexadecimal values are the intended ones for the following constants.
79 * The decimal values may be used, provided that the compiler will convert 79 * The decimal values may be used, provided that the compiler will convert
80 * from decimal to binary accurately enough to produce the hexadecimal values 80 * from decimal to binary accurately enough to produce the hexadecimal values
81 * shown. 81 * shown.
82 */ 82 */
83 83
84#define _LIBM_STATIC 84#define _LIBM_STATIC
85#include "../src/namespace.h" 85#include "../src/namespace.h"
86#include "mathimpl.h" 86#include "mathimpl.h"
87 87
88#ifdef __weak_alias 88#ifdef __weak_alias
89__weak_alias(cosh, _cosh); 89__weak_alias(cosh, _cosh);
 90__weak_alias(_coshl, _cosh);
90__weak_alias(coshf, _coshf); 91__weak_alias(coshf, _coshf);
91#endif 92#endif
92 93
93vc(mln2hi, 8.8029691931113054792E1 ,0f33,43b0,2bdb,c7e2, 7, .B00F33C7E22BDB) 94vc(mln2hi, 8.8029691931113054792E1 ,0f33,43b0,2bdb,c7e2, 7, .B00F33C7E22BDB)
94vc(mln2lo,-4.9650192275318476525E-16 ,1b60,a70f,582a,279e, -50,-.8F1B60279E582A) 95vc(mln2lo,-4.9650192275318476525E-16 ,1b60,a70f,582a,279e, -50,-.8F1B60279E582A)
95vc(lnovfl, 8.8029691931113053016E1 ,0f33,43b0,2bda,c7e2, 7, .B00F33C7E22BDA) 96vc(lnovfl, 8.8029691931113053016E1 ,0f33,43b0,2bda,c7e2, 7, .B00F33C7E22BDA)
96 97
97ic(mln2hi, 7.0978271289338397310E2, 10, 1.62E42FEFA39EF) 98ic(mln2hi, 7.0978271289338397310E2, 10, 1.62E42FEFA39EF)
98ic(mln2lo, 2.3747039373786107478E-14, -45, 1.ABC9E3B39803F) 99ic(mln2lo, 2.3747039373786107478E-14, -45, 1.ABC9E3B39803F)
99ic(lnovfl, 7.0978271289338397310E2, 9, 1.62E42FEFA39EF) 100ic(lnovfl, 7.0978271289338397310E2, 9, 1.62E42FEFA39EF)
100 101
101#ifdef vccast 102#ifdef vccast
102#define mln2hi vccast(mln2hi) 103#define mln2hi vccast(mln2hi)

cvs diff -r1.8 -r1.9 src/lib/libm/noieee_src/n_exp.c (expand / switch to unified diff)

--- src/lib/libm/noieee_src/n_exp.c 2008/03/20 16:41:26 1.8
+++ src/lib/libm/noieee_src/n_exp.c 2014/10/10 20:58:09 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: n_exp.c,v 1.8 2008/03/20 16:41:26 mhitch Exp $ */ 1/* $NetBSD: n_exp.c,v 1.9 2014/10/10 20:58:09 martin Exp $ */
2/* 2/*
3 * Copyright (c) 1985, 1993 3 * Copyright (c) 1985, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors 14 * 3. Neither the name of the University nor the names of its contributors
@@ -72,26 +72,27 @@ static char sccsid[] = "@(#)exp.c 8.1 (B @@ -72,26 +72,27 @@ static char sccsid[] = "@(#)exp.c 8.1 (B
72 * Constants: 72 * Constants:
73 * The hexadecimal values are the intended ones for the following constants. 73 * The hexadecimal values are the intended ones for the following constants.
74 * The decimal values may be used, provided that the compiler will convert 74 * The decimal values may be used, provided that the compiler will convert
75 * from decimal to binary accurately enough to produce the hexadecimal values 75 * from decimal to binary accurately enough to produce the hexadecimal values
76 * shown. 76 * shown.
77 */ 77 */
78 78
79#define _LIBM_STATIC 79#define _LIBM_STATIC
80#include "../src/namespace.h" 80#include "../src/namespace.h"
81#include "mathimpl.h" 81#include "mathimpl.h"
82 82
83#ifdef __weak_alias 83#ifdef __weak_alias
84__weak_alias(exp, _exp); 84__weak_alias(exp, _exp);
 85__weak_alias(_expl, _exp);
85__weak_alias(expf, _expf); 86__weak_alias(expf, _expf);
86#endif 87#endif
87 88
88vc(ln2hi, 6.9314718055829871446E-1 ,7217,4031,0000,f7d0, 0, .B17217F7D00000) 89vc(ln2hi, 6.9314718055829871446E-1 ,7217,4031,0000,f7d0, 0, .B17217F7D00000)
89vc(ln2lo, 1.6465949582897081279E-12 ,bcd5,2ce7,d9cc,e4f1, -39, .E7BCD5E4F1D9CC) 90vc(ln2lo, 1.6465949582897081279E-12 ,bcd5,2ce7,d9cc,e4f1, -39, .E7BCD5E4F1D9CC)
90vc(lnhuge, 9.4961163736712506989E1 ,ec1d,43bd,9010,a73e, 7, .BDEC1DA73E9010) 91vc(lnhuge, 9.4961163736712506989E1 ,ec1d,43bd,9010,a73e, 7, .BDEC1DA73E9010)
91vc(lntiny,-9.5654310917272452386E1 ,4f01,c3bf,33af,d72e, 7,-.BF4F01D72E33AF) 92vc(lntiny,-9.5654310917272452386E1 ,4f01,c3bf,33af,d72e, 7,-.BF4F01D72E33AF)
92vc(invln2, 1.4426950408889634148E0 ,aa3b,40b8,17f1,295c, 1, .B8AA3B295C17F1) 93vc(invln2, 1.4426950408889634148E0 ,aa3b,40b8,17f1,295c, 1, .B8AA3B295C17F1)
93vc(p1, 1.6666666666666602251E-1 ,aaaa,3f2a,a9f1,aaaa, -2, .AAAAAAAAAAA9F1) 94vc(p1, 1.6666666666666602251E-1 ,aaaa,3f2a,a9f1,aaaa, -2, .AAAAAAAAAAA9F1)
94vc(p2, -2.7777777777015591216E-3 ,0b60,bc36,ec94,b5f5, -8,-.B60B60B5F5EC94) 95vc(p2, -2.7777777777015591216E-3 ,0b60,bc36,ec94,b5f5, -8,-.B60B60B5F5EC94)
95vc(p3, 6.6137563214379341918E-5 ,b355,398a,f15f,792e, -13, .8AB355792EF15F) 96vc(p3, 6.6137563214379341918E-5 ,b355,398a,f15f,792e, -13, .8AB355792EF15F)
96vc(p4, -1.6533902205465250480E-6 ,ea0e,b6dd,5f84,2e93, -19,-.DDEA0E2E935F84) 97vc(p4, -1.6533902205465250480E-6 ,ea0e,b6dd,5f84,2e93, -19,-.DDEA0E2E935F84)
97vc(p5, 4.1381367970572387085E-8 ,bb4b,3431,2683,95f5, -24, .B1BB4B95F52683) 98vc(p5, 4.1381367970572387085E-8 ,bb4b,3431,2683,95f5, -24, .B1BB4B95F52683)

cvs diff -r1.7 -r1.8 src/lib/libm/noieee_src/n_log.c (expand / switch to unified diff)

--- src/lib/libm/noieee_src/n_log.c 2008/03/20 16:41:26 1.7
+++ src/lib/libm/noieee_src/n_log.c 2014/10/10 20:58:09 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: n_log.c,v 1.7 2008/03/20 16:41:26 mhitch Exp $ */ 1/* $NetBSD: n_log.c,v 1.8 2014/10/10 20:58:09 martin Exp $ */
2/* 2/*
3 * Copyright (c) 1992, 1993 3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors 14 * 3. Neither the name of the University nor the names of its contributors
@@ -33,26 +33,27 @@ @@ -33,26 +33,27 @@
33static char sccsid[] = "@(#)log.c 8.2 (Berkeley) 11/30/93"; 33static char sccsid[] = "@(#)log.c 8.2 (Berkeley) 11/30/93";
34#endif 34#endif
35#endif /* not lint */ 35#endif /* not lint */
36 36
37#include "../src/namespace.h" 37#include "../src/namespace.h"
38 38
39#include <math.h> 39#include <math.h>
40#include <errno.h> 40#include <errno.h>
41 41
42#include "mathimpl.h" 42#include "mathimpl.h"
43 43
44#ifdef __weak_alias 44#ifdef __weak_alias
45__weak_alias(log, _log); 45__weak_alias(log, _log);
 46__weak_alias(_logl, _log);
46__weak_alias(logf, _logf); 47__weak_alias(logf, _logf);
47#endif 48#endif
48 49
49/* Table-driven natural logarithm. 50/* Table-driven natural logarithm.
50 * 51 *
51 * This code was derived, with minor modifications, from: 52 * This code was derived, with minor modifications, from:
52 * Peter Tang, "Table-Driven Implementation of the 53 * Peter Tang, "Table-Driven Implementation of the
53 * Logarithm in IEEE Floating-Point arithmetic." ACM Trans. 54 * Logarithm in IEEE Floating-Point arithmetic." ACM Trans.
54 * Math Software, vol 16. no 4, pp 378-400, Dec 1990). 55 * Math Software, vol 16. no 4, pp 378-400, Dec 1990).
55 * 56 *
56 * Calculates log(2^m*F*(1+f/F)), |f/j| <= 1/256, 57 * Calculates log(2^m*F*(1+f/F)), |f/j| <= 1/256,
57 * where F = j/128 for j an integer in [0, 128]. 58 * where F = j/128 for j an integer in [0, 128].
58 * 59 *

cvs diff -r1.7 -r1.8 src/lib/libm/noieee_src/n_sinh.c (expand / switch to unified diff)

--- src/lib/libm/noieee_src/n_sinh.c 2008/03/20 16:41:26 1.7
+++ src/lib/libm/noieee_src/n_sinh.c 2014/10/10 20:58:09 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: n_sinh.c,v 1.7 2008/03/20 16:41:26 mhitch Exp $ */ 1/* $NetBSD: n_sinh.c,v 1.8 2014/10/10 20:58:09 martin Exp $ */
2/* 2/*
3 * Copyright (c) 1985, 1993 3 * Copyright (c) 1985, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors 14 * 3. Neither the name of the University nor the names of its contributors
@@ -70,26 +70,27 @@ static char sccsid[] = "@(#)sinh.c 8.1 ( @@ -70,26 +70,27 @@ static char sccsid[] = "@(#)sinh.c 8.1 (
70 * Constants: 70 * Constants:
71 * The hexadecimal values are the intended ones for the following constants. 71 * The hexadecimal values are the intended ones for the following constants.
72 * The decimal values may be used, provided that the compiler will convert 72 * The decimal values may be used, provided that the compiler will convert
73 * from decimal to binary accurately enough to produce the hexadecimal values 73 * from decimal to binary accurately enough to produce the hexadecimal values
74 * shown. 74 * shown.
75 */ 75 */
76 76
77#define _LIBM_STATIC 77#define _LIBM_STATIC
78#include "../src/namespace.h" 78#include "../src/namespace.h"
79#include "mathimpl.h" 79#include "mathimpl.h"
80 80
81#ifdef __weak_alias 81#ifdef __weak_alias
82__weak_alias(sinh, _sinh); 82__weak_alias(sinh, _sinh);
 83__weak_alias(_sinhl, _sinh);
83__weak_alias(sinhf, _sinhf); 84__weak_alias(sinhf, _sinhf);
84#endif 85#endif
85 86
86vc(mln2hi, 8.8029691931113054792E1 ,0f33,43b0,2bdb,c7e2, 7, .B00F33C7E22BDB) 87vc(mln2hi, 8.8029691931113054792E1 ,0f33,43b0,2bdb,c7e2, 7, .B00F33C7E22BDB)
87vc(mln2lo,-4.9650192275318476525E-16 ,1b60,a70f,582a,279e, -50,-.8F1B60279E582A) 88vc(mln2lo,-4.9650192275318476525E-16 ,1b60,a70f,582a,279e, -50,-.8F1B60279E582A)
88vc(lnovfl, 8.8029691931113053016E1 ,0f33,43b0,2bda,c7e2, 7, .B00F33C7E22BDA) 89vc(lnovfl, 8.8029691931113053016E1 ,0f33,43b0,2bda,c7e2, 7, .B00F33C7E22BDA)
89 90
90ic(mln2hi, 7.0978271289338397310E2, 10, 1.62E42FEFA39EF) 91ic(mln2hi, 7.0978271289338397310E2, 10, 1.62E42FEFA39EF)
91ic(mln2lo, 2.3747039373786107478E-14, -45, 1.ABC9E3B39803F) 92ic(mln2lo, 2.3747039373786107478E-14, -45, 1.ABC9E3B39803F)
92ic(lnovfl, 7.0978271289338397310E2, 9, 1.62E42FEFA39EF) 93ic(lnovfl, 7.0978271289338397310E2, 9, 1.62E42FEFA39EF)
93 94
94#ifdef vccast 95#ifdef vccast
95#define mln2hi vccast(mln2hi) 96#define mln2hi vccast(mln2hi)

cvs diff -r1.9 -r1.10 src/lib/libm/noieee_src/n_pow.c (expand / switch to unified diff)

--- src/lib/libm/noieee_src/n_pow.c 2013/11/24 14:46:18 1.9
+++ src/lib/libm/noieee_src/n_pow.c 2014/10/10 20:58:09 1.10
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: n_pow.c,v 1.9 2013/11/24 14:46:18 martin Exp $ */ 1/* $NetBSD: n_pow.c,v 1.10 2014/10/10 20:58:09 martin Exp $ */
2/* 2/*
3 * Copyright (c) 1985, 1993 3 * Copyright (c) 1985, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors 14 * 3. Neither the name of the University nor the names of its contributors
@@ -112,38 +112,38 @@ static char sccsid[] = "@(#)pow.c 8.1 (B @@ -112,38 +112,38 @@ static char sccsid[] = "@(#)pow.c 8.1 (B
112#define TRUNC(x) x = (double) (float) x 112#define TRUNC(x) x = (double) (float) x
113#define _IEEE 0 113#define _IEEE 0
114#else 114#else
115#define _IEEE 1 115#define _IEEE 1
116#define endian (((*(int *) &one)) ? 1 : 0) 116#define endian (((*(int *) &one)) ? 1 : 0)
117#define TRUNC(x) *(((int *) &x)+endian) &= 0xf8000000 117#define TRUNC(x) *(((int *) &x)+endian) &= 0xf8000000
118#define infnan(x) 0.0 118#define infnan(x) 0.0
119#endif /* __vax__ or tahoe */ 119#endif /* __vax__ or tahoe */
120 120
121static const double zero=0.0, one=1.0, two=2.0, negone= -1.0; 121static const double zero=0.0, one=1.0, two=2.0, negone= -1.0;
122 122
123static double pow_P (double, double); 123static double pow_P (double, double);
124 124
 125#ifdef __weak_alias
 126__weak_alias(_powf, powf);
 127__weak_alias(_pow, pow);
 128__weak_alias(_powl, pow);
 129#endif
 130
125float 131float
126powf(float x, float y) 132powf(float x, float y)
127{ 133{
128 return pow((double) x, (double) (y)); 134 return pow((double) x, (double) (y));
129} 135}
130 136
131long double 
132powl(long double x, long double y) 
133{ 
134 return pow((double) x, (double) (y)); 
135} 
136 
137double 137double
138pow(double x, double y) 138pow(double x, double y)
139{ 139{
140 double t; 140 double t;
141 if (y==zero) 141 if (y==zero)
142 return (one); 142 return (one);
143 else if (y==one || (_IEEE && x != x)) 143 else if (y==one || (_IEEE && x != x))
144 return (x); /* if x is NaN or y=1 */ 144 return (x); /* if x is NaN or y=1 */
145 else if (_IEEE && y!=y) /* if y is NaN */ 145 else if (_IEEE && y!=y) /* if y is NaN */
146 return (y); 146 return (y);
147 else if (!finite(y)) /* if y is INF */ 147 else if (!finite(y)) /* if y is INF */
148 if ((t=fabs(x))==one) /* +-1 ** +-INF is NaN */ 148 if ((t=fabs(x))==one) /* +-1 ** +-INF is NaN */
149 return (y - y); 149 return (y - y);