// fp.hh -- set up floating point types // $Id$ #ifdef CCTK_VARIABLE_REAL // CCTK_REAL is defined typedef CCTK_REAL fp; #else // we must be doing a test compilation outside of Cactus // FIXME: this is just a hack until my Cactus problem report #725 // is acted on and Cactus defines these #define CCTK_REAL_CTYPE_FLOAT 4 #define CCTK_REAL_CTYPE_DOUBLE 8 #define CCTK_REAL_CTYPE_LONG_DOUBLE 16 typedef double fp; #define CCTK_REAL_CTYPE CCTK_REAL_CTYPE_DOUBLE #endif // scanf(3) formats for reading fp values #if (CCTK_REAL_CTYPE == CCTK_REAL_CTYPE_FLOAT) #define FP_SCANF_FORMAT "%f" #elif (CCTK_REAL_CTYPE == CCTK_REAL_CTYPE_DOUBLE) #define FP_SCANF_FORMAT "%lf" #else #error "don't know scanf(3) format for this CCTK_REAL!" #endif // FIXME: another hack #ifdef FINITE_DIFF_ORDER // someone (probably a Makefile) has already defined this ==> leave it alone #else #define FINITE_DIFF_ORDER 2 #endif