xref: /netbsd-src/sys/arch/vax/include/math.h (revision cddc78ea67e20759c213d3f50ea3bd06ade17338)
1 /*	$NetBSD: math.h,v 1.10 2024/10/30 15:56:12 riastradh Exp $	*/
2 
3 #ifndef _VAX_MATH_H_
4 #define _VAX_MATH_H_
5 
6 #include <sys/cdefs.h>
7 #include <sys/featuretest.h>
8 
9 #if __GNUC_PREREQ__(3, 3)
10 #define	__INFINITY	__builtin_huge_valf()
11 #else
12 #define	__INFINITY	1.0E+39F
13 #endif
14 
15 static __inline int __isinf(double __x __unused) { return 0; }
16 static __inline int __isnan(double __x __unused) { return 0; }
17 #define	__HAVE_INLINE___ISINF
18 #define	__HAVE_INLINE___ISNAN
19 
20 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
21     !defined(_XOPEN_SOURCE) || \
22     ((__STDC_VERSION__ - 0) >= 199901L) || \
23     ((_POSIX_C_SOURCE - 0) >= 200112L) || \
24     ((_XOPEN_SOURCE  - 0) >= 600) || \
25     defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
26 /* 7.12#6 number classification macros; machine-specific classes */
27 #define	FP_DIRTYZERO	0x80
28 #define	FP_ROP		0x81
29 #endif
30 
31 #endif /* _VAX_MATH_H_ */
32