1169689Skan/* Copyright (C) 2005 Free Software Foundation, Inc. 2169689Skan 3169689SkanThis file is part of GCC. 4169689Skan 5169689SkanGCC is free software; you can redistribute it and/or modify 6169689Skanit under the terms of the GNU General Public License as published by 7169689Skanthe Free Software Foundation; either version 2, or (at your option) 8169689Skanany later version. 9169689Skan 10169689SkanGCC is distributed in the hope that it will be useful, 11169689Skanbut WITHOUT ANY WARRANTY; without even the implied warranty of 12169689SkanMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13169689SkanGNU General Public License for more details. 14169689Skan 15169689SkanYou should have received a copy of the GNU General Public License 16169689Skanalong with GCC; see the file COPYING. If not, write to 17169689Skanthe Free Software Foundation, 51 Franklin Street, Fifth Floor, 18169689SkanBoston, MA 02110-1301, USA. */ 19169689Skan 20169689Skan/* As a special exception, if you include this header file into source 21169689Skan files compiled by GCC, this header file does not by itself cause 22169689Skan the resulting executable to be covered by the GNU General Public 23169689Skan License. This exception does not however invalidate any other 24169689Skan reasons why the executable file might be covered by the GNU General 25169689Skan Public License. */ 26169689Skan 27169689Skan/* 28169689Skan * Draft C Extension to support decimal floating-pointing arithmetic: 29169689Skan * Characteristics of decimal floating types <decfloat.h> 30169689Skan */ 31169689Skan 32169689Skan#ifndef _DECFLOAT_H___ 33169689Skan#define _DECFLOAT_H___ 34169689Skan 35169689Skan/* Number of base-FLT_RADIX digits in the significand, p. */ 36169689Skan#undef DEC32_MANT_DIG 37169689Skan#undef DEC64_MANT_DIG 38169689Skan#undef DEC128_MANT_DIG 39169689Skan#define DEC32_MANT_DIG __DEC32_MANT_DIG__ 40169689Skan#define DEC64_MANT_DIG __DEC64_MANT_DIG__ 41169689Skan#define DEC128_MANT_DIG __DEC128_MANT_DIG__ 42169689Skan 43169689Skan/* Minimum exponent. */ 44169689Skan#undef DEC32_MIN_EXP 45169689Skan#undef DEC64_MIN_EXP 46169689Skan#undef DEC128_MIN_EXP 47169689Skan#define DEC32_MIN_EXP __DEC32_MIN_EXP__ 48169689Skan#define DEC64_MIN_EXP __DEC64_MIN_EXP__ 49169689Skan#define DEC128_MIN_EXP __DEC128_MIN_EXP__ 50169689Skan 51169689Skan/* Maximum exponent. */ 52169689Skan#undef DEC32_MAX_EXP 53169689Skan#undef DEC64_MAX_EXP 54169689Skan#undef DEC128_MAX_EXP 55169689Skan#define DEC32_MAX_EXP __DEC32_MAX_EXP__ 56169689Skan#define DEC64_MAX_EXP __DEC64_MAX_EXP__ 57169689Skan#define DEC128_MAX_EXP __DEC128_MAX_EXP__ 58169689Skan 59169689Skan/* Maximum representable finite decimal floating-point number 60169689Skan (there are 6, 15, and 33 9s after the decimal points respectively). */ 61169689Skan#undef DEC32_MAX 62169689Skan#undef DEC64_MAX 63169689Skan#undef DEC128_MAX 64169689Skan#define DEC32_MAX __DEC32_MAX__ 65169689Skan#define DEC64_MAX __DEC64_MAX__ 66169689Skan#define DEC128_MAX __DEC128_MAX__ 67169689Skan 68169689Skan/* The difference between 1 and the least value greater than 1 that is 69169689Skan representable in the given floating point type. */ 70169689Skan#undef DEC32_EPSILON 71169689Skan#undef DEC64_EPSILON 72169689Skan#undef DEC128_EPSILON 73169689Skan#define DEC32_EPSILON __DEC32_EPSILON__ 74169689Skan#define DEC64_EPSILON __DEC64_EPSILON__ 75169689Skan#define DEC128_EPSILON __DEC128_EPSILON__ 76169689Skan 77169689Skan/* Minimum normalized positive floating-point number. */ 78169689Skan#undef DEC32_MIN 79169689Skan#undef DEC64_MIN 80169689Skan#undef DEC128_MIN 81169689Skan#define DEC32_MIN __DEC32_MIN__ 82169689Skan#define DEC64_MIN __DEC64_MIN__ 83169689Skan#define DEC128_MIN __DEC128_MIN__ 84169689Skan 85169689Skan/* Minimum denormalized positive floating-point number. */ 86169689Skan#undef DEC32_DEN 87169689Skan#undef DEC64_DEN 88169689Skan#undef DEC128_DEN 89169689Skan#define DEC32_DEN __DEC32_DEN__ 90169689Skan#define DEC64_DEN __DEC64_DEN__ 91169689Skan#define DEC128_DEN __DEC128_DEN__ 92169689Skan 93169689Skan/* The floating-point expression evaluation method. 94169689Skan -1 indeterminate 95169689Skan 0 evaluate all operations and constants just to the range and 96169689Skan precision of the type 97169689Skan 1 evaluate operations and constants of type _Decimal32 98169689Skan and _Decimal64 to the range and precision of the _Decimal64 99169689Skan type, evaluate _Decimal128 operations and constants to the 100169689Skan range and precision of the _Decimal128 type; 101169689Skan 2 evaluate all operations and constants to the range and 102169689Skan precision of the _Decimal128 type. 103169689Skan*/ 104169689Skan 105169689Skan#undef DECFLT_EVAL_METHOD 106169689Skan#define DECFLT_EVAL_METHOD __DECFLT_EVAL_METHOD__ 107169689Skan 108169689Skan#endif /* _DECFLOAT_H___ */ 109