From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- unix/hlib/libc/math.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 unix/hlib/libc/math.h (limited to 'unix/hlib/libc/math.h') diff --git a/unix/hlib/libc/math.h b/unix/hlib/libc/math.h new file mode 100644 index 00000000..6d151faf --- /dev/null +++ b/unix/hlib/libc/math.h @@ -0,0 +1,24 @@ +/* + * MATH.H -- Math functions for C. + */ + +double XEXP(), XLOG(), XLOG10(), XPOW(), XSQRT(); +double XSIN(), XCOS(), XASIN(), XACOS(), XTAN(), XATAN(), XATAN2(); + +static double um_x, um_y; + +#define nint(x) XNINT((um_x=(x),&um_x)) +#define exp(x) XEXP((um_x=(x),&um_x)) +#define log(x) XLOG((um_x=(x),&um_x)) +#define log10(x) XLOG10((um_x=(x),&um_x)) +#define pow(x,y) XPOW((um_x=(x),&um_x),(um_y=(y),&um_y)) +#define sqrt(x) XSQRT((um_x=(x),&um_x)) +#define sin(x) XSIN((um_x=(x),&um_x)) +#define cos(x) XCOS((um_x=(x),&um_x)) +#define tan(x) XTAN((um_x=(x),&um_x)) +#define asin(x) XASIN((um_x=(x),&um_x)) +#define acos(x) XACOS((um_x=(x),&um_x)) +#define atan(x) XATAN((um_x=(x),&um_x)) +#define atan2(x,y) XATAN2((um_x=(x),&um_x),(um_y=(y),&um_y)) + +#define D_math -- cgit