![]() Chapter Contents |
![]() Previous |
![]() Next |
| trunc |
In Chapter 2, "Function Categories," in the section titled, "Mathematical
Functions," replace the contents of the float.h
header file with the following information:
/*
*
* This header file defines several esoteric attributes of the
* 370 floating-point implementation. The attributes apply to
* the default floating-point format, as specified by a compiler
* option.
*
*/
#if _O_BFP == 0
#define FLT_RADIX 16 /* hardware float radix */
#ifndef _SASC_HIDE_C99MATHLIB
#define DECIMAL_DIG 17 /* precision of decimal<->hex conversion */
#define FLT_EVAL_METHOD 0 /* expressions evaluated as requested type */
#endif
#define FLT_ROUNDS 0 /* float addition does not round */
#define FLT_MANT_DIG 6 /* hex digits in float mantissa */
#define DBL_MANT_DIG 14 /* hex digits in double mantissa */
#define LDBL_MANT_DIG 14 /* hex digits in long double mantissa */
#define FLT_DIG 6 /* float decimal precision */
#define DBL_DIG 15 /* double decimal precision */
#define LDBL_DIG 15 /* long double decimal precision */
#define FLT_MIN_EXP -64 /* minimum exponent of 16 for float */
#define DBL_MIN_EXP -64 /* minimum exponent of 16 for double */
#define LDBL_MIN_EXP -64 /* minimum exponent of 16 for long double */
#define FLT_MIN_10_EXP -78 /* minimum float power of 10 */
#define DBL_MIN_10_EXP -78 /* minimum double power of 10 */
#define LDBL_MIN_10_EXP -78 /* minimum long double power of 10 */
#define FLT_MAX_EXP 63 /* maximum exponent of 16 for float */
#define DBL_MAX_EXP 63 /* maximum exponent of 16 for double */
#define LDBL_MAX_EXP 63 /* maximum exponent of 16 for long double */
#define FLT_MAX_10_EXP 75 /* maximum float power of 10 */
#define DBL_MAX_10_EXP 75 /* maximum double power of 10 */
#define LDBL_MAX_10_EXP 75 /* maximum long double power of 10 */
#define FLT_MAX .7237005e76F /* maximum float */
/* == 0x.FFFFFFp252F */
#define DBL_MAX .72370055773322621e76 /* maximum double */
/* == 0x.FFFFFFFFFFFFFFp252 */
#define LDBL_MAX .72370055773322621e76L /* maximum long double */
#define FLT_EPSILON .9536743e-6F /* smallest float x such
that 1.0 + x != 1.0 */
/* == 0x1.0p-20F */
#define DBL_EPSILON .22204460492503131e-15 /* smallest double x such
that 1.0 + x != 1.0 */
/* == 0x1.0p-52 */
#define LDBL_EPSILON .22204460492503131e-15L /* smallest long double x such
that 1.0 + x != 1.0 */
#define FLT_MIN .5397606e-78F /* minimum float */
/* == 0x1.0p-260F */
#define DBL_MIN .53976053469340279e-78 /* minimum double */
/* == 0x1.0p-260 */
#define LDBL_MIN .53976053469340279e-78L /* minimum long double */
#else
#ifndef FLT_ROUNDS
int __builtin_fltrnds(void);
#endif
#define FLT_RADIX 2 /* hardware float radix */
#ifndef _SASC_HIDE_C99MATHLIB
#define DECIMAL_DIG 17 /* precision of decimal<->bin conversion */
#define FLT_EVAL_METHOD 0 /* expressions evaluated as requested type */
#endif
#define FLT_ROUNDS __builtin_fltrnds() /* actual runtime round mode */
#define FLT_MANT_DIG 24 /* binary digits in float mantissa */
#define DBL_MANT_DIG 53 /* binary digits in double mantissa */
#define LDBL_MANT_DIG 53 /* binary digits in long double mantissa */
#define FLT_DIG 6 /* float decimal precision */
#define DBL_DIG 15 /* double decimal precision */
#define LDBL_DIG 15 /* long double decimal precision */
#define FLT_MIN_EXP -125 /* minimum exponent of 2 for float */
#define DBL_MIN_EXP -1021 /* minimum exponent of 2 for double */
#define LDBL_MIN_EXP -1021 /* minimum exponent of 2 for long double */
#define FLT_MIN_10_EXP -37 /* minimum float power of 10 */
#define DBL_MIN_10_EXP -307 /* minimum double power of 10 */
#define LDBL_MIN_10_EXP -307 /* minimum long double power of 10 */
#define FLT_MAX_EXP 128 /* maximum exponent of 2 for float */
#define DBL_MAX_EXP 1024 /* maximum exponent of 2 for double */
#define LDBL_MAX_EXP 1024 /* maximum exponent of 2 for long double */
#define FLT_MAX_10_EXP 38 /* maximum float power of 10 */
#define DBL_MAX_10_EXP 308 /* maximum double power of 10 */
#define LDBL_MAX_10_EXP 308 /* maximum long double power of 10 */
#define FLT_MAX 3.402823466e38F /* maximum float */
/* == 0x1.FFFFFEp127F */
#define DBL_MAX 1.7976931348623157e308 /* maximum double */
/* == 0x1.FFFFFFFFFFFFFp1023 */
#define LDBL_MAX 1.7976931348623157e308L /* maximum long double */
#define FLT_EPSILON 1.1920929e-7F /* smallest float x such that
1.0 + x != 1.0 */
/* == 0x1.0p-23F */
#define DBL_EPSILON 2.2204460492503131e-16 /* smallest double x such
that 1.0 + x != 1.0 */
/* == 0x1.0p-52 */
#define LDBL_EPSILON 2.2204460492503131e-16L /* smallest longdbl x such
that 1.0 + x != 1.0 */
#define FLT_MIN 1.17549435e-38F /* minimum normalized float */
/* == 0x1.0p-126 */
#define DBL_MIN 2.2250738585072014e-308 /* minimum normalized double*/
/* == 0x1.0p-1022 */
#define LDBL_MIN 2.2250738585072014e-308L /* minimum normalized ldbl */
#endif
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 2004 by SAS Institute Inc., Cary, NC, USA. All rights reserved.