|
Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
|
required std libraries More...
Namespaces | |
| namespace | universal |
| namespace | ieee |
| namespace | sequences |
| namespace | internal |
| namespace | numext |
| namespace | math |
| namespace | function |
Variables | |
| BIT_CAST | |
| constexpr bool | is_bit_cast_constexpr_v = BIT_CAST_IS_CONSTEXPR |
required std libraries
Background https://en.wikipedia.org/wiki/List_of_integer_sequences.
COMPILATION DIRECTIVES TO DIFFERENT COMPILERS.
INCLUDE FILES that make up the library.
useful functions to work with cfloats elementary math functions library fused dot product / quire accumulation support (quire_mul) aliases for industry standard floating point configurations
required std libraries BEHAVIORAL COMPILATION SWITCHES
DFLOAT_ENABLE_LITERALS, DFLOAT_THROW_ARITHMETIC_EXCEPTION and DFLOAT_EXCEPT now default in dfloat_impl.hpp, beside the code they govern, so that a translation unit which includes core.hpp directly gets the same defaults this umbrella used to supply (#1334, #1436). Defining any of them before this header still wins, as before. DFLOAT_NATIVE_SQRT is gone: sqrt is the correctly rounded decimal root (#1725). INCLUDE FILES that make up the library elementary math functions library aliases for IEEE 754-2008 decimal floating-point configurations
required std libraries BEHAVIORAL COMPILATION SWITCHES
HFLOAT_ENABLE_LITERALS, HFLOAT_THROW_ARITHMETIC_EXCEPTION and HFLOAT_EXCEPT now default in hfloat_impl.hpp, beside the code they govern, so that a translation unit which includes core.hpp directly gets the same defaults this umbrella used to supply (#1334, #1436). Defining any of them before this header still wins, as before. INCLUDE FILES that make up the library elementary math functions library aliases for IBM System/360 hexadecimal floating-point configurations
required std libraries BEHAVIORAL COMPILATION SWITCHES
POSITIONAL_ENABLE_LITERALS and POSITIONAL_THROW_ARITHMETIC_EXCEPTION now default in positional_impl.hpp, so that a translation unit which includes core.hpp directly gets the same defaults this umbrella used to supply (#1334, #1436). Defining either before this header still wins, as before. INCLUDE FILES that make up the library math functions aliases for positional integer configurations
Layered per #1334: core.hpp arithmetic, no streams manipulators.hpp type_tag / to_binary / to_native iostream.hpp operator<< / operator>>
A translation unit that only computes can include core.hpp directly and skip the stream headers entirely. math functions aliases for rational configurations
https://en.wikipedia.org/wiki/Generalizations_of_Fibonacci_numbers#Tribonacci_numbers
0, 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 504, 927, 1705, 3136, 5768, 10609, 19513, 35890, 66012, ... (sequence A000073 in the OEIS)
The series was first described formally by Agronomof in 1914, but its first unintentional use is in the Origin of species by Charles R. Darwin. In the example of illustrating the growth of elephant population, he relied on the calculations made by his son, George H. Darwin. The term tribonacci was suggested by Feinberg in 1963.
The tribonacci constant, the only real solution to the equation x^3 - x^2 - x - 1 = 0, which is related to tribonacci sequences (in which U_n = U_n-1 + U_n-2 + U_n-3) as the Golden Ratio is related to the Fibonacci sequence and its generalizations. This ratio also appears when a snub cube is inscribed in an octahedron or a cube, by analogy once again with the appearance of the Golden Ratio when an icosahedron is inscribed in an octahedron. [John Sharp, 1997]"
The tribonacci constant corresponds to the Golden Section in a tripartite division 1 = u_1 + u_2 + u_3 of a unit line segment; i.e., if 1/u_1 = u_1/u_2 = u_2/u_3 = c, c is the tribonacci constant. - Seppo Mustonen, Apr 19 2005
The other two polynomial roots are the complex-conjugated pair -0.4196433776070805662759262... +- i* 0.60629072920719936925934... - R. J. Mathar, Oct 25 2008
| sw::BIT_CAST |
|
inlineconstexpr |