projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
errno: port to LynxOS 178 2.2.2
[gnulib.git]
/
lib
/
cosl.c
diff --git
a/lib/cosl.c
b/lib/cosl.c
index
d23c15f
..
d448548
100644
(file)
--- a/
lib/cosl.c
+++ b/
lib/cosl.c
@@
-18,12
+18,24
@@
/* Specification. */
#include <math.h>
/* Specification. */
#include <math.h>
-/* sinl(x)
- * Return sine function of x.
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+cosl (long double x)
+{
+ return cos (x);
+}
+
+#else
+
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/s_cosl.c. */
+
+/* cosl(x)
+ * Return cosine function of x.
*
* kernel function:
* __kernel_sinl ... sine function on [-pi/4,pi/4]
*
* kernel function:
* __kernel_sinl ... sine function on [-pi/4,pi/4]
- * __kernel_cosl ... cose function on [-pi/4,pi/4]
+ * __kernel_cosl ... cos
in
e function on [-pi/4,pi/4]
* __ieee754_rem_pio2l ... argument reduction routine
*
* Method.
* __ieee754_rem_pio2l ... argument reduction routine
*
* Method.
@@
-49,7
+61,7
@@
* TRIG(x) returns trig(x) nearly rounded
*/
* TRIG(x) returns trig(x) nearly rounded
*/
-#include "trigl.h"
+#
include "trigl.h"
long double
cosl (long double x)
long double
cosl (long double x)
@@
-88,6
+100,8
@@
cosl (long double x)
}
}
}
}
+#endif
+
#if 0
int
main (void)
#if 0
int
main (void)