----------------->  GNU Sather - compiler configuration file  <----------------
-- Copyright (C) 199x by International Computer Science Institute            --
-- This file is part of the GNU Sather library. It is free software; you may --
-- redistribute  and/or modify it under the terms of the GNU Library General --
-- Public  License (LGPL)  as published  by the  Free  Software  Foundation; --
-- either version 2 of the license, or (at your option) any later version.   --
-- This  library  is distributed  in the  hope that it will  be  useful, but --
-- WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See Doc/LGPL for more details.       --
-- The license text is also available from:  Free Software Foundation, Inc., --
-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                     --
-------------->  Please email comments to <bug-sather@gnu.org>  <--------------

#ifndef FLTD_CONFIG
#define FLTD_CONFIG

#ifdef PP
#undef PP
#endif

#ifdef APP
#undef APP
#endif

#ifdef FPP
#undef FPP
#endif

#ifdef VSTD
#undef VSTD
#endif

#ifdef IM
#undef IM
#endif

#define PP	no_pre,no_post
#define APP	arith,PP
#define FPP	fragile,PP
#define VSTD    var "@r $$;"
#define IM	declare "#include <math.h>"

-- the following definitions assume that all floating point 
-- operations return NaN if used with wrong arguments (a la IEEE)
-- If this is not the case for some machines, all functions that
-- could break should get a 'fragile'

FLTD_PLUS:		PP,VSTD,exec "$$=$0+$1;" "$$";
FLTD_MINUS:		PP,VSTD,exec "$$=$0-$1;" "$$";
FLTD_NEGATE:		PP,VSTD,exec "$$= -$0;" "$$";
FLTD_TIMES:		PP,VSTD,exec "$$=$0*$1;" "$$";
FLTD_DIV:		PP,VSTD,exec "$$=FLTDIV($0,$1);" "$$";
FLTD_IS_EQ:		PP,VSTD,exec "$$=($0)==($1);" "$$";
FLTD_IS_LT:		PP,VSTD,exec "$$=($0)<($1);" "$$";
FLTD_FINITE:		PP,VSTD,IM,exec "$$=finite($0)!=0;" "$$";
FLTD_ISINF:		PP,VSTD,IM,exec "$$=isinf($0)!=0;" "$$";
FLTD_ISNORMAL:		PP,VSTD,IM,exec "$$=isnormal($0)!=0;" "$$";
FLTD_ISSUBNORMAL:	PP,VSTD,IM,exec "$$=issubnormal($0)!=0;" "$$";
FLTD_ISZERO:		PP,VSTD,IM,exec "$$=iszero($0)!=0;" "$$";
FLTD_SIGNBIT:		PP,VSTD,IM,exec "$$=signbit($0);" "$$";
FLTD_ILOGB:		PP,VSTD,IM,exec "$$=ilogb($0);" "$$";
FLTD_COPYSIGN:		PP,VSTD,IM,exec "$$=copysign($0);" "$$";
FLTD_NEXTUP:		PP,VSTD,IM,exec "$$=nextafter($0,1.0d);" "$$";
FLTD_NEXTDOWN:		PP,VSTD,IM,exec "$$=nextafter($0,-1.0d);" "$$";
FLTD_REMAINDER:		PP,VSTD,IM,exec "$$=remainder($0);" "$$";
FLTD_FMOD:		PP,VSTD,IM,exec "$$=fmod($0);" "$$";
FLTD_SCALBN:		PP,VSTD,IM,exec "$$=scalbn($0);" "$$";
FLTD_J0:		PP,VSTD,IM,exec "$$=j0($0);" "$$";
FLTD_J1:		PP,VSTD,IM,exec "$$=j1($0);" "$$";
FLTD_JN:		PP,VSTD,IM,exec "$$=jn($0);" "$$";
FLTD_Y0:		PP,VSTD,IM,exec "$$=y0($0);" "$$";
FLTD_Y1:		PP,VSTD,IM,exec "$$=y1($0);" "$$";
FLTD_YN:		PP,VSTD,IM,exec "$$=yn($0);" "$$";
FLTD_ERF:		PP,VSTD,IM,exec "$$=erf($0);" "$$";
FLTD_ERFC:		PP,VSTD,IM,exec "$$=erfc($0);" "$$";
FLTD_EXP:		PP,VSTD,IM,exec "$$=exp($0);" "$$";
FLTD_EXPM1:		PP,VSTD,IM,exec "$$=expm1($0);" "$$";
FLTD_EXP2:		PP,VSTD,IM,exec "$$=exp2($0);" "$$";
FLTD_EXP10:		PP,VSTD,IM,exec "$$=FLTDEXP10($0);" "$$";
FLTD_LOG:		PP,VSTD,IM,exec "$$=log($0);" "$$";
FLTD_LOG1P:		PP,VSTD,IM,exec "$$=log1p($0);" "$$";
FLTD_LOG10:		PP,VSTD,IM,exec "$$=log10($0);" "$$";
FLTD_POW:		PP,VSTD,IM,exec "$$=pow($0,$1);" "$$";
FLTD_SINH:		PP,VSTD,IM,exec "$$=sinh($0);" "$$";
FLTD_COSH:		PP,VSTD,IM,exec "$$=cosh($0);" "$$";
FLTD_TANH:		PP,VSTD,IM,exec "$$=tanh($0);" "$$";
FLTD_ASINH:		PP,VSTD,IM,exec "$$=asinh($0);" "$$";
FLTD_ACOSH:		PP,VSTD,IM,exec "$$=acosh($0);" "$$";
FLTD_ATANH:		PP,VSTD,IM,exec "$$=atanh($0);" "$$";
FLTD_HYPOT:		PP,VSTD,IM,exec "$$=hypot($0);" "$$";
FLTD_SIN:		PP,VSTD,IM,exec "$$=sin($0);" "$$";
FLTD_COS:		PP,VSTD,IM,exec "$$=cos($0);" "$$";
FLTD_SINCOS:		PP,IM,exec "sincos($0,&$1,&$2);";
FLTD_TAN:		PP,VSTD,IM,exec "$$=tan($0);" "$$";
FLTD_ASIN:		PP,VSTD,IM,exec "$$=asin($0);" "$$";
FLTD_ACOS:		PP,VSTD,IM,exec "$$=acos($0);" "$$";
FLTD_ATAN:		PP,VSTD,IM,exec "$$=atan($0);" "$$";
FLTD_ATAN2:		PP,VSTD,IM,exec "$$=atan2($0,$1);" "$$";
FLTD_SINPI:		PP,VSTD,IM,exec "$$=sinpi($0);" "$$";
FLTD_COSPI:		PP,VSTD,IM,exec "$$=cospi($0);" "$$";
FLTD_SINCOSPI:		PP,IM,exec "sincospi($0,&$1,&$2);";
FLTD_TANPI:		PP,VSTD,IM,exec "$$=tanpi($0);" "$$";
FLTD_ASINPI:		PP,VSTD,IM,exec "$$=asinpi($0);" "$$";
FLTD_ACOSPI:		PP,VSTD,IM,exec "$$=acospi($0);" "$$";
FLTD_ATANPI:		PP,VSTD,IM,exec "$$=atanpi($0);" "$$";
FLTD_ATAN2PI:		PP,VSTD,IM,exec "$$=atan2pi($0,$1);" "$$";
FLTD_FABS:		PP,VSTD,IM,exec "$$=fabs($0);" "$$";
FLTD_LGAMMA:		PP,VSTD,IM,exec "$$=lgamma($0);" "$$";
FLTD_SQRT:		PP,VSTD,IM,exec "$$=sqrt($0);" "$$";
FLTD_CBRT:		PP,VSTD,IM,exec "$$=cbrt($0);" "$$";
FLTD_STORE_INTO:	PP,VSTD,IM,exec "$$=FLTDSTORE($0,$1);" "$$";
FLTD_STORE_INTO_PREC:	PP,VSTD,IM,exec "$$=FLTDSTOREPREC($0,$1,$2);" "$$";
FLTD_ATOF:		PP,VSTD,IM,exec "$$=atof($1->arr_part);" "$$";
FLTD_INT:		PP,VSTD,exec "$$=(INT)$0;" "$$";
FLTD_FLT:		PP,VSTD,exec "$$=(FLT)$0;" "$$";
FLTD_FLTX: 		PP,VSTD,exec "$$=(FLTX)$0;" "$$";
FLTD_FLTDX: 		PP,VSTD,exec "$$=(FLTDX)$0;" "$$";
FLTD_TRUNCATE:		PP,VSTD,IM,exec "$$=FLTDTRUNCATE($0);" "$$";
FLTD_FLOOR:		PP,VSTD,IM,exec "$$=floor($0);" "$$";
FLTD_CEIL:		PP,VSTD,IM,exec "$$=ceil($0);" "$$";
FLTD_ROUND:		PP,VSTD,IM,exec "$$=FLTDROUND($0);" "$$";
FLTD_PI:		PP,VSTD,IM,exec "$$=M_PI;" "$$";
FLTD_E:			PP,VSTD,IM,exec "$$=M_E;" "$$";
FLTD_SQRT_2:		PP,VSTD,IM,exec "$$=M_SQRT2;" "$$";
FLTD_LOG_2:		PP,VSTD,IM,exec "$$=M_LOG2;" "$$";
FLTD_LOG2_E:		PP,VSTD,IM,exec "$$=M_LOG2E;" "$$";
FLTD_LOG10_E:		PP,VSTD,IM,exec "$$=M_LOG10E;" "$$";
FLTD_LOG_10:		PP,VSTD,IM,exec "$$=M_LN10;" "$$";
FLTD_HALF_PI:		PP,VSTD,IM,exec "$$=M_PI_2;" "$$";
FLTD_QUARTER_PI:	PP,VSTD,IM,exec "$$=M_PI_4;" "$$";
FLTD_INV_SQRT_2:	PP,VSTD,IM,exec "$$=M_SQRT1_2;" "$$";
FLTD_INV_PI:		PP,VSTD,IM,exec "$$=M_1_PI;" "$$";
FLTD_DOUBLE_INV_PI:	PP,VSTD,IM,exec "$$=M_2_PI;" "$$";
FLTD_DOUBLE_SQRT_PI:	PP,VSTD,IM,exec "$$=M_2_SQRTPI;" "$$";
FLTD_SIGNALING_NAN:	PP,VSTD,IM,exec "$$=signaling_nan($1);" "$$";
FLTD_QUIET_NAN:		PP,VSTD,IM,exec "$$=quiet_nan($1);" "$$";
FLTD_INFINITY:		PP,VSTD,IM,exec "$$=infinity();" "$$";
FLTD_MIN_NORMAL:	PP,VSTD,IM,exec "$$=FLTDMINNORMAL;" "$$";
FLTD_MAX_NORMAL:	PP,VSTD,IM,exec "$$=FLTDMAXNORMAL;" "$$";
FLTD_MIN_SUBNORMAL:	PP,VSTD,IM,exec "$$=FLTDMINSUBNORMAL;" "$$";
FLTD_MAX_SUBNORMAL:	PP,VSTD,IM,exec "$$=FLTDMINSUBNORMAL;" "$$";
FLTD_GET_REP:		PP,exec "rt_fltd_get_rep($0,$1,$2,$3,$4);";

#endif
