1 /* x86_64/native-math.h ********************************************************
3 Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
5 See file COPYRIGHT for information on usage and disclaimer of warranties
7 Contains the machine-specific floating point definitions.
9 Authors: Michael Gschwind EMAIL: cacao@complang.tuwien.ac.at
10 Andreas Krall EMAIL: cacao@complang.tuwien.ac.at
11 Christian Thalinger EMAIL: cacao@complang.tuwien.ac.at
13 Last Change: $Id: native-math.h 465 2003-09-17 23:14:48Z twisti $
15 *******************************************************************************/
17 #ifndef _NATIVE_MATH_H
18 #define _NATIVE_MATH_H
20 /* include machine-specific math.h */
24 /* define infinity for floating point numbers */
26 static u4 flt_nan = 0x7fc00000;
27 static u4 flt_posinf = 0x7f800000;
28 static u4 flt_neginf = 0xff800000;
30 #define FLT_NAN (*((float*) (&flt_nan)))
31 #define FLT_POSINF (*((float*) (&flt_posinf)))
32 #define FLT_NEGINF (*((float*) (&flt_neginf)))
34 /* define infinity for double floating point numbers */
36 static u8 dbl_nan = 0x7ff8000000000000L;
37 static u8 dbl_posinf = 0x7ff0000000000000L;
38 static u8 dbl_neginf = 0xfff0000000000000L;
40 #define DBL_NAN (*((double*) (&dbl_nan)))
41 #define DBL_POSINF (*((double*) (&dbl_posinf)))
42 #define DBL_NEGINF (*((double*) (&dbl_neginf)))