projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
strtoumax: fix typo in previous commit.
[gnulib.git]
/
lib
/
asinl.c
diff --git
a/lib/asinl.c
b/lib/asinl.c
index
5dee0cb
..
c7ba71d
100644
(file)
--- a/
lib/asinl.c
+++ b/
lib/asinl.c
@@
-14,6
+14,18
@@
/* Specification. */
#include <math.h>
/* Specification. */
#include <math.h>
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+asinl (long double x)
+{
+ return asin (x);
+}
+
+#else
+
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/e_asinl.c. */
+
/*
Long double expansions contributed by
Stephen L. Moshier <moshier@na-net.ornl.gov>
/*
Long double expansions contributed by
Stephen L. Moshier <moshier@na-net.ornl.gov>
@@
-183,38
+195,40
@@
asinl (long double x)
t = asinr5625 + p / q;
}
else
t = asinr5625 + p / q;
}
else
- t = pio2_hi + pio2_lo - 2 * asinl
(sqrtl((1-y)/
2));
+ t = pio2_hi + pio2_lo - 2 * asinl
(sqrtl ((1 - y) /
2));
return t * sign;
}
return t * sign;
}
+#endif
+
#if 0
int
main (void)
{
printf ("%.18Lg %.18Lg\n",
#if 0
int
main (void)
{
printf ("%.18Lg %.18Lg\n",
- asinl(1.0L),
+ asinl
(1.0L),
1.5707963267948966192313216916397514420984L);
printf ("%.18Lg %.18Lg\n",
1.5707963267948966192313216916397514420984L);
printf ("%.18Lg %.18Lg\n",
- asinl(0.7071067811865475244008443621048490392848L),
+ asinl
(0.7071067811865475244008443621048490392848L),
0.7853981633974483096156608458198757210492L);
printf ("%.18Lg %.18Lg\n",
0.7853981633974483096156608458198757210492L);
printf ("%.18Lg %.18Lg\n",
- asinl(0.5L),
+ asinl
(0.5L),
0.5235987755982988730771072305465838140328L);
printf ("%.18Lg %.18Lg\n",
0.5235987755982988730771072305465838140328L);
printf ("%.18Lg %.18Lg\n",
- asinl(0.3090169943749474241022934171828190588600L),
+ asinl
(0.3090169943749474241022934171828190588600L),
0.3141592653589793238462643383279502884196L);
printf ("%.18Lg %.18Lg\n",
0.3141592653589793238462643383279502884196L);
printf ("%.18Lg %.18Lg\n",
- asinl(-1.0L),
+ asinl
(-1.0L),
-1.5707963267948966192313216916397514420984L);
printf ("%.18Lg %.18Lg\n",
-1.5707963267948966192313216916397514420984L);
printf ("%.18Lg %.18Lg\n",
- asinl(-0.7071067811865475244008443621048490392848L),
+ asinl
(-0.7071067811865475244008443621048490392848L),
-0.7853981633974483096156608458198757210492L);
printf ("%.18Lg %.18Lg\n",
-0.7853981633974483096156608458198757210492L);
printf ("%.18Lg %.18Lg\n",
- asinl(-0.5L),
+ asinl
(-0.5L),
-0.5235987755982988730771072305465838140328L);
printf ("%.18Lg %.18Lg\n",
-0.5235987755982988730771072305465838140328L);
printf ("%.18Lg %.18Lg\n",
- asinl(-0.3090169943749474241022934171828190588600L),
+ asinl
(-0.3090169943749474241022934171828190588600L),
-0.3141592653589793238462643383279502884196L);
}
#endif
-0.3141592653589793238462643383279502884196L);
}
#endif