DoubleFloat¶

DoubleFloat is intended to make accessible hardware floating point arithmetic in Language{}, either native double precision, or IEEE. On most machines, there will be hardware support for the arithmetic operations: +, *, / and possibly also the sqrt operation. The operations exp, log, sin, cos, atan are normally coded in software based on minimax polynomial/rational approximations. Some general comments about the accuracy of the operations: the operations +, *, / and sqrt are expected to be fully accurate. The operations exp, log, sin, cos and atan are not expected to be fully accurate. In particular, sin and cos will lose all precision for large arguments. The Float domain provides an alternative to the `DoubleFloat` domain. It provides an arbitrary precision model of floating point arithmetic. This means that accuracy problems like those above are eliminated by increasing the working precision where necessary. Float provides some special functions such as erf, the error function in addition to the elementary functions. The disadvantage of Float is that it is much more expensive than small floats when the latter can be used.

0: %

from AbelianMonoid

1: %

from MagmaWithUnit

*: (%, %) -> %

from LeftModule %

*: (%, Fraction Integer) -> %
*: (Fraction Integer, %) -> %
*: (Integer, %) -> %

from AbelianGroup

*: (NonNegativeInteger, %) -> %

from AbelianMonoid

*: (PositiveInteger, %) -> %

from AbelianSemiGroup

+: (%, %) -> %

from AbelianSemiGroup

-: % -> %

from AbelianGroup

-: (%, %) -> %

from AbelianGroup

/: (%, %) -> %

from Field

/: (%, Integer) -> %
<=: (%, %) -> Boolean

from PartialOrder

<: (%, %) -> Boolean

from PartialOrder

=: (%, %) -> Boolean

from BasicType

>=: (%, %) -> Boolean

from PartialOrder

>: (%, %) -> Boolean

from PartialOrder

^: (%, %) -> %
^: (%, Fraction Integer) -> %

^: (%, Integer) -> %

from DivisionRing

^: (%, NonNegativeInteger) -> %

from MagmaWithUnit

^: (%, PositiveInteger) -> %

from Magma

~=: (%, %) -> Boolean

from BasicType

abs: % -> %

from OrderedRing

acos: % -> %
acosh: % -> %
acot: % -> %
acoth: % -> %
acsc: % -> %
acsch: % -> %
airyAi: % -> %
airyAiPrime: % -> %
airyBi: % -> %
airyBiPrime: % -> %
angerJ: (%, %) -> %
annihilate?: (%, %) -> Boolean

from Rng

antiCommutator: (%, %) -> %
asec: % -> %
asech: % -> %
asin: % -> %
asinh: % -> %
associates?: (%, %) -> Boolean

from EntireRing

associator: (%, %, %) -> %
atan: % -> %
atan: (%, %) -> %

`atan(x, y)` computes the arc tangent from `x` with phase `y`.

atanh: % -> %
base: () -> PositiveInteger
besselI: (%, %) -> %
besselJ: (%, %) -> %
besselK: (%, %) -> %
besselY: (%, %) -> %
Beta: (%, %) -> %
Beta: (%, %, %) -> %
bits: () -> PositiveInteger
ceiling: % -> %

from RealNumberSystem

characteristic: () -> NonNegativeInteger
charlierC: (%, %, %) -> %
coerce: % -> %

from Algebra %

coerce: % -> OutputForm
coerce: Fraction Integer -> %
coerce: Integer -> %
commutator: (%, %) -> %
conjugate: % -> %
convert: % -> DoubleFloat
convert: % -> Float
convert: % -> InputForm
convert: % -> Pattern Float
convert: % -> String
cos: % -> %
cosh: % -> %
cot: % -> %
coth: % -> %
csc: % -> %
csch: % -> %
D: % -> %

from DifferentialRing

D: (%, NonNegativeInteger) -> %

from DifferentialRing

differentiate: % -> %

from DifferentialRing

differentiate: (%, NonNegativeInteger) -> %

from DifferentialRing

digamma: % -> %
digits: () -> PositiveInteger
diracDelta: % -> %
divide: (%, %) -> Record(quotient: %, remainder: %)

from EuclideanDomain

doubleFloatFormat: String -> String

change the output format for doublefloats using lisp format strings

ellipticE: % -> %
ellipticE: (%, %) -> %
ellipticF: (%, %) -> %
ellipticK: % -> %
ellipticPi: (%, %, %) -> %
euclideanSize: % -> NonNegativeInteger

from EuclideanDomain

exp1: () -> %

`exp1()` returns the natural log base `2.718281828...`.

exp: % -> %
exponent: % -> Integer
expressIdealMember: (List %, %) -> Union(List %, failed)
exquo: (%, %) -> Union(%, failed)

from EntireRing

extendedEuclidean: (%, %) -> Record(coef1: %, coef2: %, generator: %)

from EuclideanDomain

extendedEuclidean: (%, %, %) -> Union(Record(coef1: %, coef2: %), failed)

from EuclideanDomain

factor: % -> Factored %
float: (Integer, Integer) -> %
float: (Integer, Integer, PositiveInteger) -> %
floor: % -> %

from RealNumberSystem

fractionPart: % -> %

from RealNumberSystem

Gamma: % -> %
Gamma: (%, %) -> %
gcd: (%, %) -> %

from GcdDomain

gcd: List % -> %

from GcdDomain

gcdPolynomial: (SparseUnivariatePolynomial %, SparseUnivariatePolynomial %) -> SparseUnivariatePolynomial %

from GcdDomain

hankelH1: (%, %) -> %
hankelH2: (%, %) -> %
hash: % -> SingleInteger

from Hashable

hashUpdate!: (HashState, %) -> HashState

from Hashable

hermiteH: (%, %) -> %
hypergeometricF: (List %, List %, %) -> %
inv: % -> %

from DivisionRing

jacobiCn: (%, %) -> %
jacobiDn: (%, %) -> %
jacobiP: (%, %, %, %) -> %
jacobiSn: (%, %) -> %
jacobiTheta: (%, %) -> %
jacobiZeta: (%, %) -> %
kelvinBei: (%, %) -> %
kelvinBer: (%, %) -> %
kelvinKei: (%, %) -> %
kelvinKer: (%, %) -> %
kummerM: (%, %, %) -> %
kummerU: (%, %, %) -> %
laguerreL: (%, %, %) -> %
lambertW: % -> %
latex: % -> String

from SetCategory

lcm: (%, %) -> %

from GcdDomain

lcm: List % -> %

from GcdDomain

lcmCoef: (%, %) -> Record(llcm_res: %, coeff1: %, coeff2: %)

from LeftOreRing

leftPower: (%, NonNegativeInteger) -> %

from MagmaWithUnit

leftPower: (%, PositiveInteger) -> %

from Magma

leftRecip: % -> Union(%, failed)

from MagmaWithUnit

legendreP: (%, %, %) -> %
legendreQ: (%, %, %) -> %
lerchPhi: (%, %, %) -> %
log10: % -> %

`log10(x)` computes the logarithm with base 10 for `x`.

log2: % -> %

`log2(x)` computes the logarithm with base 2 for `x`.

log: % -> %
lommelS1: (%, %, %) -> %
lommelS2: (%, %, %) -> %
mantissa: % -> Integer
max: (%, %) -> %

from OrderedSet

max: () -> % if % hasn’t arbitraryExponent and % hasn’t arbitraryPrecision
meijerG: (List %, List %, List %, List %, %) -> %
meixnerM: (%, %, %, %) -> %
min: (%, %) -> %

from OrderedSet

min: () -> % if % hasn’t arbitraryExponent and % hasn’t arbitraryPrecision
multiEuclidean: (List %, %) -> Union(List %, failed)

from EuclideanDomain

negative?: % -> Boolean

from OrderedRing

norm: % -> %

from RealNumberSystem

nthRoot: (%, Integer) -> %

OMwrite: % -> String

from OpenMath

OMwrite: (%, Boolean) -> String

from OpenMath

OMwrite: (OpenMathDevice, %) -> Void

from OpenMath

OMwrite: (OpenMathDevice, %, Boolean) -> Void

from OpenMath

one?: % -> Boolean

from MagmaWithUnit

opposite?: (%, %) -> Boolean

from AbelianMonoid

order: % -> Integer
patternMatch: (%, Pattern Float, PatternMatchResult(Float, %)) -> PatternMatchResult(Float, %)
pi: () -> %
plenaryPower: (%, PositiveInteger) -> %
polygamma: (%, %) -> %
polylog: (%, %) -> %
positive?: % -> Boolean

from OrderedRing

precision: () -> PositiveInteger
prime?: % -> Boolean
principalIdeal: List % -> Record(coef: List %, generator: %)
qlog: % -> %

`qlog(x)` computes natural logarithm of `x`. It assumes that `x > 0`.

qsqrt: % -> %

`qsqrt(x)` computes square root of `x`. It assumes that `x >= 0`.

quo: (%, %) -> %

from EuclideanDomain

rationalApproximation: (%, NonNegativeInteger) -> Fraction Integer

`rationalApproximation(f, n)` computes a rational approximation `r` to `f` with relative error `< 10^(-n)`.

rationalApproximation: (%, NonNegativeInteger, NonNegativeInteger) -> Fraction Integer

`rationalApproximation(f, n, b)` computes a rational approximation `r` to `f` with relative error `< b^(-n)` (that is, `|(r-f)/f| < b^(-n)`).

recip: % -> Union(%, failed)

from MagmaWithUnit

rem: (%, %) -> %

from EuclideanDomain

retract: % -> Fraction Integer
retract: % -> Integer
retractIfCan: % -> Union(Fraction Integer, failed)
retractIfCan: % -> Union(Integer, failed)
riemannZeta: % -> %
rightPower: (%, NonNegativeInteger) -> %

from MagmaWithUnit

rightPower: (%, PositiveInteger) -> %

from Magma

rightRecip: % -> Union(%, failed)

from MagmaWithUnit

round: % -> %

from RealNumberSystem

sample: %

from AbelianMonoid

sec: % -> %
sech: % -> %
sign: % -> %
sign: % -> Integer

from OrderedRing

sin: % -> %
sinh: % -> %
sizeLess?: (%, %) -> Boolean

from EuclideanDomain

smaller?: (%, %) -> Boolean

from Comparable

sqrt: % -> %

squareFree: % -> Factored %
squareFreePart: % -> %
struveH: (%, %) -> %
struveL: (%, %) -> %
subtractIfCan: (%, %) -> Union(%, failed)
tan: % -> %
tanh: % -> %
toString: % -> String
toString: (%, NonNegativeInteger) -> String
truncate: % -> %

from RealNumberSystem

unit?: % -> Boolean

from EntireRing

unitCanonical: % -> %

from EntireRing

unitNormal: % -> Record(unit: %, canonical: %, associate: %)

from EntireRing

unitStep: % -> %
weberE: (%, %) -> %
weierstrassP: (%, %, %) -> %
weierstrassPInverse: (%, %, %) -> %
weierstrassPPrime: (%, %, %) -> %
weierstrassSigma: (%, %, %) -> %
weierstrassZeta: (%, %, %) -> %
whittakerM: (%, %, %) -> %
whittakerW: (%, %, %) -> %
wholePart: % -> Integer

from RealNumberSystem

zero?: % -> Boolean

from AbelianMonoid

AbelianGroup

AbelianMonoid

AbelianSemiGroup

Approximate

ArcHyperbolicFunctionCategory

ArcTrigonometricFunctionCategory

BasicType

BiModule(%, %)

CancellationAbelianMonoid

canonicalsClosed

canonicalUnitNormal

CharacteristicZero

CommutativeRing

CommutativeStar

Comparable

DifferentialRing

DivisionRing

ElementaryFunctionCategory

EntireRing

EuclideanDomain

Field

FloatingPointSystem

GcdDomain

Hashable

HyperbolicFunctionCategory

IntegralDomain

LeftOreRing

Magma

MagmaWithUnit

Monoid

NonAssociativeRing

NonAssociativeRng

NonAssociativeSemiRing

NonAssociativeSemiRng

noZeroDivisors

OpenMath

OrderedAbelianGroup

OrderedAbelianMonoid

OrderedAbelianSemiGroup

OrderedCancellationAbelianMonoid

OrderedRing

OrderedSet

PartialOrder

PrincipalIdealDomain

RealConstant

RealNumberSystem

Ring

Rng

SemiGroup

SemiRing

SemiRng

SetCategory

SpecialFunctionCategory

TranscendentalFunctionCategory

TrigonometricFunctionCategory

TwoSidedRecip

UniqueFactorizationDomain

unitsKnown