|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
diff -rup a/sysdeps/ieee754/dbl-64/slowexp.c b/sysdeps/ieee754/dbl-64/slowexp.c
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
--- a/sysdeps/ieee754/dbl-64/slowexp.c 2012-01-01 05:16:32.000000000 -0700
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+++ b/sysdeps/ieee754/dbl-64/slowexp.c 2012-03-13 11:57:51.225330782 -0600
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
@@ -31,6 +31,8 @@
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
#include "mpa.h"
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
#include "math_private.h"
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+#include <stap-probe.h>
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
#ifndef SECTION
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
# define SECTION
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
#endif
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
@@ -61,12 +63,21 @@ __slowexp(double x) {
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__sub(&mpy,&mpcor,&mpz,p);
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__mp_dbl(&mpw, &w, p);
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__mp_dbl(&mpz, &z, p);
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
- if (w == z) return w;
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ if (w == z) {
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ /* Track how often we get to the slow exp code plus
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ its input/output values. */
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ LIBC_PROBE (slowexp_p6, 2, &x, &w);
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ return w;
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
else { /* if calculating is not exactly */
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
p = 32;
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__dbl_mp(x,&mpx,p);
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__mpexp(&mpx, &mpy, p);
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__mp_dbl(&mpy, &res, p);
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ /* Track how often we get to the uber-slow exp code plus
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ its input/output values. */
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ LIBC_PROBE (slowexp_p32, 2, &x, &res;;
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
return res;
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
}
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
}
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
diff -rup a/sysdeps/ieee754/dbl-64/slowpow.c b/sysdeps/ieee754/dbl-64/slowpow.c
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
--- a/sysdeps/ieee754/dbl-64/slowpow.c 2012-01-01 05:16:32.000000000 -0700
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+++ b/sysdeps/ieee754/dbl-64/slowpow.c 2012-03-13 11:57:59.865284437 -0600
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
@@ -35,6 +35,8 @@
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
#include "mpa.h"
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
#include "math_private.h"
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+#include <stap-probe.h>
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
#ifndef SECTION
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
# define SECTION
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
#endif
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
@@ -66,7 +68,12 @@ __slowpow(double x, double y, double z)
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__mp_dbl(&mpr, &res, p);
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__sub(&mpp,&eps,&mpr1,p); /* pp -eps =r1 */
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__mp_dbl(&mpr1, &res1, p); /* converting into double precision */
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
- if (res == res1) return res;
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ if (res == res1) {
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ /* Track how often we get to the slow pow code plus
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ its input/output values. */
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ LIBC_PROBE (slowpow_p6, 4, &x, &y, &z, &res;;
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ return res;
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
p = 32; /* if we get here result wasn't calculated exactly, continue */
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__dbl_mp(x,&mpx,p); /* for more exact calculation */
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
@@ -76,5 +83,10 @@ __slowpow(double x, double y, double z)
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__mul(&mpy,&mpz,&mpw,p); /* y*z =w */
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__mpexp(&mpw, &mpp, p); /* e^w=pp */
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
__mp_dbl(&mpp, &res, p); /* converting into double precision */
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ /* Track how often we get to the uber-slow pow code plus
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ its input/output values. */
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+ LIBC_PROBE (slowpow_p32, 4, &x, &y, &z, &res;;
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
+
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
return res;
|
|
![](https://seccdn.libravatar.org/avatar/53857e0805011d7cae7e9291c3c7672dd1958db8b0541c307a68d49a98f2e30a?s=16&d=retro) |
4ad9348 |
}
|