Comment
[cacao.git] / x86_64 / native-math.h
1 /* x86_64/native-math.h ********************************************************
2
3     Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
4
5     See file COPYRIGHT for information on usage and disclaimer of warranties
6
7     Contains the machine-specific floating point definitions.
8
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
12
13     Last Change: $Id: native-math.h 465 2003-09-17 23:14:48Z twisti $
14
15 *******************************************************************************/
16
17 #ifndef _NATIVE_MATH_H
18 #define _NATIVE_MATH_H
19
20 /* include machine-specific math.h */
21
22 #include <math.h>
23
24 /* define infinity for floating point numbers */
25
26 static u4 flt_nan    = 0x7fc00000;
27 static u4 flt_posinf = 0x7f800000;
28 static u4 flt_neginf = 0xff800000;
29
30 #define FLT_NAN     (*((float*) (&flt_nan)))
31 #define FLT_POSINF  (*((float*) (&flt_posinf)))
32 #define FLT_NEGINF  (*((float*) (&flt_neginf)))
33
34 /* define infinity for double floating point numbers */
35
36 static u8 dbl_nan    = 0x7ff8000000000000L;
37 static u8 dbl_posinf = 0x7ff0000000000000L;
38 static u8 dbl_neginf = 0xfff0000000000000L;
39
40 #define DBL_NAN     (*((double*) (&dbl_nan)))
41 #define DBL_POSINF  (*((double*) (&dbl_posinf)))
42 #define DBL_NEGINF  (*((double*) (&dbl_neginf)))
43
44 #endif