/*======================================================================= Some useful general definitions Copyright 1993 (C) David Hinds - All Rights Reserved Source file umath.h Version 1.1, Updated 3/15/93 =======================================================================*/ /* These macros are significantly faster on the Iris */ #define FABS(a) ((a) > 0 ? (a) : (-a)) #define SQRTABS(a) ((a) > 0 ? sqrt(a) : sqrt(-a)) #ifndef __sgi # define fsqrt(a) sqrt(a) #endif #define SQR(a) ((a)*(a)) #define DSQR(a) ((dbl_t)(a)*(dbl_t)(a)) #define CUBE(a) ((a)*(a)*(a)) #ifndef MIN # define MIN(a,b) (((a)<(b))?(a):(b)) # define MAX(a,b) (((a)>(b))?(a):(b)) #endif