tanya.math

This package provides mathematical functions.

The $(D_PSYMBOL tanya.math) package itself provides only representation functions for built-in types, such as functions that provide information about internal representation of floating-point numbers and low-level operatons on these. Actual mathematical functions and additional types can be found in its submodules. $(D_PSYMBOL tanya.math) doesn't import any submodules publically, they should be imported explicitly.

Modules

nbtheory
module tanya.math.nbtheory

Number theory.

random
module tanya.math.random

Random number generator.

tests
module tanya.math.tests
Undocumented in source.

Members

Enums

FloatingPointClass
enum FloatingPointClass

Floating-point number classifications.

IEEEPrecision
enum IEEEPrecision

Floating-point number precisions according to IEEE-754.

Functions

classify
FloatingPointClass classify(F x)

Returns whether x is a NaN, zero, infinity, subnormal or normalized number.

isFinite
bool isFinite(F x)

Determines whether x is a finite number.

isInfinity
bool isInfinity(F x)

Determines whether x is a positive or negative infinity.

isNaN
bool isNaN(F x)

Determines whether x is not a number (NaN).

isNormal
bool isNormal(F x)

Determines whether x is a normilized number or not.

isSubnormal
bool isSubnormal(F x)

Determines whether x is a denormilized number or not.

pow
H pow(I x, G y, H z)

Computes x to the power y modulo z.

signBit
bool signBit(F x)

Determines whether the sign bit of x is set or not.

Templates

ieeePrecision
template ieeePrecision(F)

Tests the precision of floating-point type F.

Unions

FloatBits
union FloatBits(F)
Undocumented in source.

Meta