Expand description
Traits for arithmetic.
Modulesยง
- abs
- Absolute value of
Floats. - add
- Addition of
Floats, and ofFloats withRationals. - agm
- Taking the AGM (arithmetic-geometric mean) of two
Floats, and ofFloats withRationals. - div
- Division of
Floats, ofFloats byRationals, and ofRationals byFloats. - is_
power_ of_ 2 - An implementation of
IsPowerOf2, a trait for determining whether a number is an integer power of 2. - ln
LnandLnAssign, traits for computing the natural logarithm ofFloats.- ln_
1_ plus_ x Ln1PlusXandLn1PlusXAssign, traits for computing $\ln(1+x)$ forFloats.- log_
base LogBaseandLogBaseAssign, traits for computing the base-$b$ logarithm ofFloats for an arbitrary integer base $b>1$.- log_
base_ 2 LogBase2andLogBase2Assign, traits for computing the base-2 logarithm ofFloats.- log_
base_ 1_ plus_ x LogBaseOf1PlusXandLogBaseOf1PlusXAssign, traits for computing $\log_b(1+x)$ ofFloats for an arbitrary integer base $b>1$.- log_
base_ 2_ 1_ plus_ x LogBase2Of1PlusXandLogBase2Of1PlusXAssign, traits for computing $\log_2(1+x)$ forFloats.- log_
base_ 10 LogBase10andLogBase10Assign, traits for computing the base-10 logarithm ofFloats.- log_
base_ 10_ 1_ plus_ x LogBase10Of1PlusXandLogBase10Of1PlusXAssign, traits for computing $\log_{10}(1+x)$ ofFloats.- log_
base_ float_ base LogBaseandLogBaseAssign, implemented for aFloatbase, for computing $\log_b x$ of aFloatwith an arbitraryFloatbase.- log_
base_ float_ base_ 1_ plus_ x LogBaseOf1PlusXandLogBaseOf1PlusXAssign, implemented for aFloatbase, for computing $\log_b(1+x)$ of aFloatwith an arbitraryFloatbase.- log_
base_ power_ of_ 2 LogBasePowerOf2andLogBasePowerOf2Assign, traits for computing $\log_{2^k} x$ forFloats.- log_
base_ power_ of_ 2_ 1_ plus_ x LogBasePowerOf2Of1PlusXandLogBasePowerOf2Of1PlusXAssign, traits for computing $\log_{2^k}(1+x)$ forFloats.- log_
base_ rational_ base LogBaseandLogBaseAssign, implemented for aRationalbase, for computing $\log_b x$ of aFloatwith an arbitrary rational base $b>1$.- log_
base_ rational_ base_ 1_ plus_ x LogBaseOf1PlusXandLogBaseOf1PlusXAssign, implemented for aRationalbase, for computing $\log_b(1+x)$ of aFloatwith an arbitrary rational base $b>1$.- log_
base_ rational_ float_ base - Functions for computing $\log_b x$ of a
Rational$x$ with an arbitraryFloatbase, returning aFloat. - log_
base_ rational_ rational_ base - Functions for computing $\log_b x$ of a
Rational$x$ with an arbitraryRationalbase $b>1$, returning aFloat. - mul
- Multiplication of
Floats, and ofFloats withRationals. - neg
- Negation of
Floats. - power_
of_ 2 - Implementations of
PowerOf2, a trait for computing a power of 2. - reciprocal
- Implementations of
ReciprocalandReciprocalAssign, traits for computing the reciprocal of a number. - reciprocal_
sqrt ReciprocalSqrtandReciprocalSqrtAssign, traits for computing the reciprocal of the square root ofFloats.- shl
- Left-shifting a
Float(multiplying it by a power of 2). - shl_
round - Implementations of
ShlRoundandShlRoundAssign, traits for multiplying a number by a power of 2 and rounding according to a specifiedRoundingMode. ForFloats, rounding is only necessary in the cases of overflow and underflow. - shr
- Right-shifting a
Float(dividing it by a power of 2). - shr_
round - Implementations of
ShlRoundandShrRoundAssign, traits for dividing a number by a power of 2 and rounding according to a specifiedRoundingMode. ForFloats, rounding is only necessary in the cases of overflow and underflow. - sign
- An implementation of
Sign, a trait for determining the sign of a number. - sqrt
SqrtandSqrtAssign, traits for computing the square root ofFloats.- square
- Squaring of
Floats. - sub
- Subtraction of
Floats, ofFloats byRationals, and ofRationals byFloats.