Class Reference for E1039 Core & Analysis Software
halfLimits.h
Go to the documentation of this file.
1
//
3
// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
4
// Digital Ltd. LLC
5
//
6
// All rights reserved.
7
//
8
// Redistribution and use in source and binary forms, with or without
9
// modification, are permitted provided that the following conditions are
10
// met:
11
// * Redistributions of source code must retain the above copyright
12
// notice, this list of conditions and the following disclaimer.
13
// * Redistributions in binary form must reproduce the above
14
// copyright notice, this list of conditions and the following disclaimer
15
// in the documentation and/or other materials provided with the
16
// distribution.
17
// * Neither the name of Industrial Light & Magic nor the names of
18
// its contributors may be used to endorse or promote products derived
19
// from this software without specific prior written permission.
20
//
21
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
//
34
35
36
// Primary authors:
37
// Florian Kainz <kainz@ilm.com>
38
// Rod Bogart <rgb@ilm.com>
39
40
41
#ifndef INCLUDED_HALF_LIMITS_H
42
#define INCLUDED_HALF_LIMITS_H
43
44
45
//------------------------------------------------------------------------
46
//
47
// C++ standard library-style numeric_limits for class half
48
//
49
//------------------------------------------------------------------------
50
51
#include <limits>
52
#include "
half.h
"
53
54
namespace
std {
55
56
template
<>
57
class
numeric_limits <
half
>
58
{
59
public
:
60
61
static
const
bool
is_specialized =
true
;
62
63
static
half
min
() throw () {
return
HALF_NRM_MIN
;}
64
static
half
max
() throw () {
return
HALF_MAX
;}
65
66
static
const
int
digits =
HALF_MANT_DIG
;
67
static
const
int
digits10 =
HALF_DIG
;
68
static
const
bool
is_signed =
true
;
69
static
const
bool
is_integer =
false
;
70
static
const
bool
is_exact =
false
;
71
static
const
int
radix =
HALF_RADIX
;
72
static
half
epsilon
() throw () {
return
HALF_EPSILON
;}
73
static
half
round_error
() throw () {
return
HALF_EPSILON
/ 2;}
74
75
static
const
int
min_exponent =
HALF_MIN_EXP
;
76
static
const
int
min_exponent10 =
HALF_MIN_10_EXP
;
77
static
const
int
max_exponent =
HALF_MAX_EXP
;
78
static
const
int
max_exponent10 =
HALF_MAX_10_EXP
;
79
80
static
const
bool
has_infinity =
true
;
81
static
const
bool
has_quiet_NaN =
true
;
82
static
const
bool
has_signaling_NaN =
true
;
83
static
const
float_denorm_style has_denorm = denorm_present;
84
static
const
bool
has_denorm_loss =
false
;
85
static
half
infinity
() throw () {
return
half::posInf
();}
86
static
half
quiet_NaN
() throw () {
return
half::qNan
();}
87
static
half
signaling_NaN
() throw () {
return
half::sNan
();}
88
static
half
denorm_min
() throw () {
return
HALF_MIN
;}
89
90
static
const
bool
is_iec559 =
false
;
91
static
const
bool
is_bounded =
false
;
92
static
const
bool
is_modulo =
false
;
93
94
static
const
bool
traps =
true
;
95
static
const
bool
tinyness_before =
false
;
96
static
const
float_round_style round_style = round_to_nearest;
97
};
98
99
100
}
// namespace std
101
102
#endif
half
Definition:
half.h:103
half::qNan
static half qNan()
Definition:
half.h:736
half::sNan
static half sNan()
Definition:
half.h:745
half::posInf
static half posInf()
Definition:
half.h:718
std::numeric_limits< half >::denorm_min
static half denorm_min()
Definition:
halfLimits.h:88
std::numeric_limits< half >::infinity
static half infinity()
Definition:
halfLimits.h:85
std::numeric_limits< half >::epsilon
static half epsilon()
Definition:
halfLimits.h:72
std::numeric_limits< half >::round_error
static half round_error()
Definition:
halfLimits.h:73
std::numeric_limits< half >::signaling_NaN
static half signaling_NaN()
Definition:
halfLimits.h:87
std::numeric_limits< half >::max
static half max()
Definition:
halfLimits.h:64
std::numeric_limits< half >::quiet_NaN
static half quiet_NaN()
Definition:
halfLimits.h:86
std::numeric_limits< half >::min
static half min()
Definition:
halfLimits.h:63
half.h
HALF_DIG
#define HALF_DIG
Definition:
half.h:286
HALF_MAX_EXP
#define HALF_MAX_EXP
Definition:
half.h:296
HALF_NRM_MIN
#define HALF_NRM_MIN
Definition:
half.h:274
HALF_RADIX
#define HALF_RADIX
Definition:
half.h:289
HALF_MANT_DIG
#define HALF_MANT_DIG
Definition:
half.h:283
HALF_MAX
#define HALF_MAX
Definition:
half.h:276
HALF_MIN_10_EXP
#define HALF_MIN_10_EXP
Definition:
half.h:301
HALF_MAX_10_EXP
#define HALF_MAX_10_EXP
Definition:
half.h:305
HALF_MIN_EXP
#define HALF_MIN_EXP
Definition:
half.h:291
HALF_EPSILON
#define HALF_EPSILON
Definition:
half.h:278
HALF_MIN
#define HALF_MIN
Definition:
half.h:272
e1039-core
packages
Half
halfLimits.h
Built by
Haiwang Yu
. updated:
Thu Jan 30 2025 10:15:16
using
1.9.1 with
SeaQuest GitHub integration