Math utilities

ReactiveMP package exports tiny and huge objects to represent tiny and huge numbers. These objects aren't really numbers and behave differently depending on the context. They do support any operation that is defined for Real numbers. For more info see Julia's documentation about promotion.

ReactiveMP.tinyConstant

tiny

An instance of a TinyNumber. Behaviour and actual value of the tiny number depends on the context.

Example

julia> tiny
tiny

julia> 1 + tiny
1.000000000001

julia> tiny + 1
1.000000000001

julia> 1f0 + tiny
1.000001f0

julia> big"1.0" + tiny
1.000000000000000000000001

julia> big"1" + tiny
1.000000000000000000000001

See also: huge, TinyNumber, HugeNumber

source
ReactiveMP.hugeConstant

huge

An instance of a HugeNumber. Behaviour and actual value of the huge number depends on the context.

Example

julia> huge
huge

julia> 1 + huge
1.000000000001e12

julia> huge + 1
1.000000000001e12

julia> 1f0 + huge
1.000001f6

julia> big"1.0" + huge
1.000000000000000000000001e+24

julia> big"1" + huge
1.000000000000000000000001e+24

See also: tiny, TinyNumber, HugeNumber

source
ReactiveMP.TinyNumberType
TinyNumber <: Real

TinyNumber represents (wow!) tiny number that can be used in a various computations without unnecessary type promotions.

See also: HugeNumber

source
ReactiveMP.HugeNumberType
HugeNumber <: Real

HugeNumber represents (wow!) huge number that can be used in a various computations without unnecessary type promotions.

See also: TinyNumber

source