Honeycomb  0.1
Component-Model Framework
Numeral.h
Go to the documentation of this file.
1 // Honeycomb, Copyright (C) 2014 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 float128 Signed;
18  typedef float128 Unsigned;
19  typedef int128 Int;
20  typedef float128 Real;
21  typedef Quad_ Real_;
22  static const bool isSigned = true;
23  static const bool isInteger = false;
24 
25  Info() :
26  min( -1.7976931348623158e+308),
27  max( 1.7976931348623158e+308),
28  smallest( 2.2250738585072014e-308),
29  epsilon( 2.2204460492503131e-016),
30  one( 1.0),
31  inf( 1.0 / (1.0 - one)),
32  nan( 0.0 / (1.0 - one)) {}
33 
34  const float128 min;
35  const float128 max;
36  const float128 smallest;
37  const float128 epsilon;
38  const float128 one;
39  const float128 inf;
40  const float128 nan;
41  };
42 }
43 
44 #ifndef __LP64__
45  template<> class Numeral<long> : public NumeralInt<long> {};
46  template<> class Numeral<unsigned long> : public NumeralInt<unsigned long> {};
47 #endif
48 template<> class Numeral<float128> : public NumeralFloat<float128> {};
49 
50 }
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.