-
Notifications
You must be signed in to change notification settings - Fork 1
/
cdecfloat
51 lines (40 loc) · 2.1 KB
/
cdecfloat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* ------------------------------------------------------------------ */
/* cdecfloat header - dfp additions to C++ standard header <cfloat> */
/* ------------------------------------------------------------------ */
/* Copyright (c) IBM Corporation, 2006. All rights reserved. */
/* */
/* This software is made available under the terms of the IBM */
/* alphaWorks License Agreement (distributed with this software as */
/* alphaWorks-License.txt). Your use of this software indicates */
/* your acceptance of the terms and conditions of that Agreement. */
/* */
/* Please send comments, suggestions, and corrections to the author: */
/* klarer@ca.ibm.com */
/* Robert Klarer */
/* ------------------------------------------------------------------ */
#ifndef _CDECFLOAT_
#define _CDECFLOAT_
#include "decimal"
/* from <decfloat.h> */
#define DEC32_MANT_DIG 7
#define DEC64_MANT_DIG 16
#define DEC128_MANT_DIG 34
#define DEC32_MIN_EXP -95
#define DEC64_MIN_EXP -383
#define DEC128_MIN_EXP -6143
#define DEC32_MAX_EXP 96
#define DEC64_MAX_EXP 384
#define DEC128_MAX_EXP 6144
#define DEC32_MAX std::decimal::decimal32::_GetMax()
#define DEC64_MAX std::decimal::decimal64::_GetMax()
#define DEC128_MAX std::decimal::decimal128::_GetMax()
#define DEC32_MIN std::decimal::decimal32::_GetMin()
#define DEC64_MIN std::decimal::decimal64::_GetMin()
#define DEC128_MIN std::decimal::decimal128::_GetMin()
#define DEC32_EPSILON std::decimal::decimal32::_GetEpsilon()
#define DEC64_EPSILON std::decimal::decimal64::_GetEpsilon()
#define DEC128_EPSILON std::decimal::decimal128::_GetEpsilon()
#define DEC32_DEN std::decimal::decimal32::_GetDenormalizedMin()
#define DEC64_DEN std::decimal::decimal64::_GetDenormalizedMin()
#define DEC128_DEN std::decimal::decimal128::_GetDenormalizedMin()
#endif /* ndef _CDECFLOAT_ */