Initial revision
[cacao.git] / alpha / native-math.h
1 /************************* alpha/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
12         Last Change: 1997/10/21
13
14 *******************************************************************************/
15
16 /* include machine-specific math.h */
17
18 #include <math.h>
19
20 /* define infinity for floating point numbers */
21
22 u4 flt_nan    = 0xffffffff;
23 u4 flt_posinf = 0x7f800000;
24 u4 flt_neginf = 0xff800000;
25
26 #define FLT_NAN    (*((float*) (&flt_nan)))
27 #define FLT_POSINF (*((float*) (&flt_posinf)))
28 #define FLT_NEGINF (*((float*) (&flt_neginf)))
29
30 /* define infinity for double floating point numbers */
31
32 u8 dbl_nan    = 0xffffffffffffffffL ;
33 u8 dbl_posinf = 0x7ff0000000000000L ;
34 u8 dbl_neginf = 0xfff0000000000000L ;
35
36 #define DBL_NAN    (*((double*) (&dbl_nan)))
37 #define DBL_POSINF (*((double*) (&dbl_posinf)))
38 #define DBL_NEGINF (*((double*) (&dbl_neginf)))