diff options
Diffstat (limited to 'contrib/libf2c/libF77/z_exp.c')
-rw-r--r-- | contrib/libf2c/libF77/z_exp.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/contrib/libf2c/libF77/z_exp.c b/contrib/libf2c/libF77/z_exp.c index 85fb63e..ecf8429 100644 --- a/contrib/libf2c/libF77/z_exp.c +++ b/contrib/libf2c/libF77/z_exp.c @@ -2,20 +2,16 @@ #ifdef KR_headers double exp(), cos(), sin(); -VOID z_exp(resx, z) doublecomplex *resx, *z; +VOID z_exp(r, z) doublecomplex *r, *z; #else #undef abs -#include <math.h> -void z_exp(doublecomplex *resx, doublecomplex *z) +#include "math.h" +void z_exp(doublecomplex *r, doublecomplex *z) #endif { -double expx; -doublecomplex res; + double expx, zi = z->i; -expx = exp(z->r); -res.r = expx * cos(z->i); -res.i = expx * sin(z->i); - -resx->r = res.r; -resx->i = res.i; -} + expx = exp(z->r); + r->r = expx * cos(zi); + r->i = expx * sin(zi); + } |