summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7784fa7)
asm() statements. Not sure why I bothered...
SCCS-vsn: usr.bin/f77/libF77/r_tan.c 5.4
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
int errno;
static double invpi = 1.27323954473516268; /* 4/pi */
int errno;
static double invpi = 1.27323954473516268; /* 4/pi */
+#ifndef __GNUC__
+fortran float sin(), cos();
+#else
+#define sin(x) \
+({ \
+ float __result; \
+ asm("ldd %1; cvdf; sinf; stf %0" : "=rm" (__result) : "rm" (x)); \
+ __result; \
+})
+#define cos(x) \
+({ \
+ float __result; \
+ asm("ldd %1; cvdf; cosf; stf %0" : "=rm" (__result) : "rm" (x)); \
+ __result; \
+})
+#endif
+
float
r_tan(parg)
float *parg;
{
double arg;
float
r_tan(parg)
float *parg;
{
double arg;
- fortran float sin(), cos();
double modf();
float flmax_();
double temp, e, x, xsq;
double modf();
float flmax_();
double temp, e, x, xsq;