Loading...
Searching...
No Matches
HalfLimits.h
Go to the documentation of this file.
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Industrial Light & Magic nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
// Primary authors:
// Florian Kainz <kainz@ilm.com>
// Rod Bogart <rgb@ilm.com>
#ifndef OPENVDB_MATH_HALF_LIMITS_HAS_BEEN_INCLUDED
#define OPENVDB_MATH_HALF_LIMITS_HAS_BEEN_INCLUDED
//------------------------------------------------------------------------
//
// C++ standard library-style numeric_limits for class half
//
//------------------------------------------------------------------------
#include <limits>
#include "Half.h"
namespace std {
template <>
class numeric_limits <openvdb::OPENVDB_VERSION_NAME::math::half>
{
public:
static const bool is_specialized = true;
static half min () throw () {return HALF_NRM_MIN;}
static half max () throw () {return HALF_MAX;}
static const int digits = HALF_MANT_DIG;
static const int digits10 = HALF_DIG;
static const bool is_signed = true;
static const bool is_integer = false;
static const bool is_exact = false;
static const int radix = HALF_RADIX;
static half epsilon () throw () {return HALF_EPSILON;}
static half round_error () throw () {return HALF_EPSILON / 2;}
static const int min_exponent = HALF_MIN_EXP;
static const int min_exponent10 = HALF_MIN_10_EXP;
static const int max_exponent = HALF_MAX_EXP;
static const int max_exponent10 = HALF_MAX_10_EXP;
static const bool has_infinity = true;
static const bool has_quiet_NaN = true;
static const bool has_signaling_NaN = true;
static const float_denorm_style has_denorm = denorm_present;
static const bool has_denorm_loss = false;
static half infinity () throw () {return half::posInf();}
static half quiet_NaN () throw () {return half::qNan();}
static half signaling_NaN () throw () {return half::sNan();}
static half denorm_min () throw () {return HALF_MIN;}
static const bool is_iec559 = false;
static const bool is_bounded = false;
static const bool is_modulo = false;
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style = round_to_nearest;
#if __cplusplus >= 201103L
// C++11 additions.
static constexpr int max_digits10 = HALF_DECIMAL_DIG;
static half lowest () {return -HALF_MAX;}
#endif
};
} // namespace std
#endif // OPENVDB_MATH_HALF_LIMITS_HAS_BEEN_INCLUDED
Half.h
std::numeric_limits< openvdb::v10_0::math::half >::min_exponent10
static const int min_exponent10
Definition HalfLimits.h:76
std::numeric_limits< openvdb::v10_0::math::half >::quiet_NaN
static half quiet_NaN()
Definition HalfLimits.h:86
std::numeric_limits< openvdb::v10_0::math::half >::max
static half max()
Definition HalfLimits.h:64
std::numeric_limits< openvdb::v10_0::math::half >::round_error
static half round_error()
Definition HalfLimits.h:73
std::numeric_limits< openvdb::v10_0::math::half >::traps
static const bool traps
Definition HalfLimits.h:94
std::numeric_limits< openvdb::v10_0::math::half >::is_signed
static const bool is_signed
Definition HalfLimits.h:68
std::numeric_limits< openvdb::v10_0::math::half >::has_quiet_NaN
static const bool has_quiet_NaN
Definition HalfLimits.h:81
std::numeric_limits< openvdb::v10_0::math::half >::is_iec559
static const bool is_iec559
Definition HalfLimits.h:90
std::numeric_limits< openvdb::v10_0::math::half >::max_exponent10
static const int max_exponent10
Definition HalfLimits.h:78
std::numeric_limits< openvdb::v10_0::math::half >::tinyness_before
static const bool tinyness_before
Definition HalfLimits.h:95
std::numeric_limits< openvdb::v10_0::math::half >::is_integer
static const bool is_integer
Definition HalfLimits.h:69
std::numeric_limits< openvdb::v10_0::math::half >::is_bounded
static const bool is_bounded
Definition HalfLimits.h:91
std::numeric_limits< openvdb::v10_0::math::half >::min_exponent
static const int min_exponent
Definition HalfLimits.h:75
std::numeric_limits< openvdb::v10_0::math::half >::min
static half min()
Definition HalfLimits.h:63
std::numeric_limits< openvdb::v10_0::math::half >::max_exponent
static const int max_exponent
Definition HalfLimits.h:77
std::numeric_limits< openvdb::v10_0::math::half >::has_infinity
static const bool has_infinity
Definition HalfLimits.h:80
std::numeric_limits< openvdb::v10_0::math::half >::has_denorm
static const float_denorm_style has_denorm
Definition HalfLimits.h:83
std::numeric_limits< openvdb::v10_0::math::half >::epsilon
static half epsilon()
Definition HalfLimits.h:72
std::numeric_limits< openvdb::v10_0::math::half >::denorm_min
static half denorm_min()
Definition HalfLimits.h:88
std::numeric_limits< openvdb::v10_0::math::half >::signaling_NaN
static half signaling_NaN()
Definition HalfLimits.h:87
std::numeric_limits< openvdb::v10_0::math::half >::is_exact
static const bool is_exact
Definition HalfLimits.h:70
std::numeric_limits< openvdb::v10_0::math::half >::is_specialized
static const bool is_specialized
Definition HalfLimits.h:61
std::numeric_limits< openvdb::v10_0::math::half >::is_modulo
static const bool is_modulo
Definition HalfLimits.h:92
std::numeric_limits< openvdb::v10_0::math::half >::digits
static const int digits
Definition HalfLimits.h:66
std::numeric_limits< openvdb::v10_0::math::half >::radix
static const int radix
Definition HalfLimits.h:71
std::numeric_limits< openvdb::v10_0::math::half >::infinity
static half infinity()
Definition HalfLimits.h:85
std::numeric_limits< openvdb::v10_0::math::half >::has_signaling_NaN
static const bool has_signaling_NaN
Definition HalfLimits.h:82
std::numeric_limits< openvdb::v10_0::math::half >::has_denorm_loss
static const bool has_denorm_loss
Definition HalfLimits.h:84
std::numeric_limits< openvdb::v10_0::math::half >::round_style
static const float_round_style round_style
Definition HalfLimits.h:96
std::numeric_limits< openvdb::v10_0::math::half >::digits10
static const int digits10
Definition HalfLimits.h:67
openvdb
Definition Exceptions.h:13
std
Definition Coord.h:587