Honeycomb  0.1
Component-Model Framework
Numeral.h
Go to the documentation of this file.
1 // Honeycomb, Copyright (C) 2015 NewGamePlus Inc. Distributed under the Boost Software License v1.0.
2 #pragma once
3 
5 namespace honey
6 {
7 
8 namespace numeral_priv
9 {
10  #ifndef __LP64__
11  template<> struct Info<long> : Info<int32> {};
12  template<> struct Info<unsigned long> : Info<uint32> {};
13  #endif
14 
15  template<> struct Info<float128>
16  {
17  typedef int128 Int;
18  typedef float128 Real;
19  typedef Quad_ Real_;
20 
21  constexpr float128 min() const { return -1.7976931348623158e+308; }
22  constexpr float128 max() const { return 1.7976931348623158e+308; }
23  constexpr float128 smallest() const { return 2.2250738585072014e-308; }
24  constexpr float128 epsilon() const { return 2.2204460492503131e-016; }
25  constexpr float128 one() const { return 1.0; }
26  constexpr float128 inf() const { return 1.0 / (1.0 - one()); }
27  constexpr float128 nan() const { return 0.0 / (1.0 - one()); }
28  };
29 }
30 
31 #ifndef __LP64__
32  template<> class Numeral<long> : public NumeralInt<long> {};
33  template<> class Numeral<unsigned long> : public NumeralInt<unsigned long> {};
34 #endif
35 template<> class Numeral<float128> : public NumeralFloat<float128> {};
36 
37 }
long double float128
128 bit float type
Definition: Core.h:32
float Real
Real number type. See Real_ for real number operations and constants.
Definition: Real.h:21
int64 int128
Definition: Core.h:24
Numeral< Real >::Real_ Real_
Operations and constants for Real type. See Float_, Double_.
Definition: Real.h:25
Global Honeycomb namespace.