JuliaFloat¶
jobject.spad line 668 [edit on github]
JuliaFloat implements arbitrary precision floating point arithmetic using Julia BigFloats. Use the MPFR library: https://www.mpfr.org/
- 0: %
from AbelianMonoid
- 1: %
from MagmaWithUnit
*: (%, Integer) -> %
- *: (Fraction Integer, %) -> %
from LeftModule Fraction Integer
- *: (Integer, %) -> %
from AbelianGroup
- *: (NonNegativeInteger, %) -> %
from AbelianMonoid
- *: (PositiveInteger, %) -> %
from AbelianSemiGroup
- +: (%, %) -> %
from AbelianSemiGroup
- -: % -> %
from AbelianGroup
- -: (%, %) -> %
from AbelianGroup
- /: (%, %) -> %
from Field
- /: (%, Integer) -> %
from FloatingPointSystem
/: (Integer, %) -> %
- <=: (%, %) -> Boolean
from PartialOrder
- <: (%, %) -> Boolean
from PartialOrder
- >=: (%, %) -> Boolean
from PartialOrder
- >: (%, %) -> Boolean
from PartialOrder
- ^: (%, %) -> %
- ^: (%, Integer) -> %
from DivisionRing
- ^: (%, NonNegativeInteger) -> %
from MagmaWithUnit
- ^: (%, PositiveInteger) -> %
from Magma
- abs: % -> %
from OrderedRing
- acos: % -> %
- acosh: % -> %
- acot: % -> %
- acoth: % -> %
- acsc: % -> %
- acsch: % -> %
- annihilate?: (%, %) -> Boolean
from Rng
- antiCommutator: (%, %) -> %
- asec: % -> %
- asech: % -> %
- asin: % -> %
- asinh: % -> %
- associates?: (%, %) -> Boolean
from EntireRing
- associator: (%, %, %) -> %
from NonAssociativeRng
- atan: % -> %
- atan: (%, %) -> %
atan(x, y)
computes the inverse tangent of x/y.
- atanh: % -> %
- base: () -> PositiveInteger
from FloatingPointSystem
- bits: () -> PositiveInteger
from FloatingPointSystem
- bits: PositiveInteger -> PositiveInteger
from FloatingPointSystem
- ceiling: % -> %
from RealNumberSystem
- characteristic: () -> NonNegativeInteger
from NonAssociativeRing
- cis: % -> JuliaComplexFloat
cis(x)
returns exp(%i*x) computed efficiently.
- cispi: % -> JuliaComplexFloat
cispi(x)
returns cis(%pi*x) computed efficiently.
- coerce: % -> %
from Algebra %
- coerce: % -> OutputForm
from CoercibleTo OutputForm
coerce: Float -> %
coerce: JuliaFloat64 -> %
- commutator: (%, %) -> %
from NonAssociativeRng
- convert: % -> DoubleFloat
from ConvertibleTo DoubleFloat
- convert: % -> Float
from ConvertibleTo Float
- convert: % -> InputForm
from ConvertibleTo InputForm
- convert: % -> Pattern Float
from ConvertibleTo Pattern Float
- convert: % -> String
from ConvertibleTo String
- cos: % -> %
- cosh: % -> %
- cot: % -> %
- coth: % -> %
- csc: % -> %
- csch: % -> %
- D: % -> %
from DifferentialRing
- D: (%, NonNegativeInteger) -> %
from DifferentialRing
- differentiate: % -> %
from DifferentialRing
- differentiate: (%, NonNegativeInteger) -> %
from DifferentialRing
- digits: () -> PositiveInteger
from FloatingPointSystem
- digits: PositiveInteger -> PositiveInteger
from FloatingPointSystem
- divide: (%, %) -> Record(quotient: %, remainder: %)
from EuclideanDomain
- euclideanSize: % -> NonNegativeInteger
from EuclideanDomain
- exp10: % -> %
exp10(x)
computes the base 10 exponential ofx
.
- exp1: () -> %
exp1()
returns the JuliaFloatℯ
(%e
or exp(1)).
- exp2: % -> %
exp2(x)
computes the base 2 exponential ofx
.
- exp: % -> %
- exp: () -> %
exp()
returns the JuliaFloatℯ
(%e
or exp(1)).
- expm1: % -> %
expm1(x)
computes accuratelyℯ^x
-1. It avoids the loss of precision involved in the direct evaluation of exp(x
)-1
for small values ofx
.
- exponent: % -> Integer
from FloatingPointSystem
- expressIdealMember: (List %, %) -> Union(List %, failed)
from PrincipalIdealDomain
- exquo: (%, %) -> Union(%, failed)
from EntireRing
- extendedEuclidean: (%, %) -> Record(coef1: %, coef2: %, generator: %)
from EuclideanDomain
- extendedEuclidean: (%, %, %) -> Union(Record(coef1: %, coef2: %), failed)
from EuclideanDomain
- finite?: % -> Boolean
finite?(x)
tests whether or notx
is finite.
- float: (Integer, Integer) -> %
from FloatingPointSystem
- float: (Integer, Integer, PositiveInteger) -> %
from FloatingPointSystem
- floor: % -> %
from RealNumberSystem
- fractionPart: % -> %
from RealNumberSystem
- gcdPolynomial: (SparseUnivariatePolynomial %, SparseUnivariatePolynomial %) -> SparseUnivariatePolynomial %
from GcdDomain
- integer?: % -> Boolean
integer?(x)
tests whether or notx
is an integer.
- inv: % -> %
from DivisionRing
jfloat: Float -> %
jfloat: Integer -> %
jfloat: String -> %
- jlAbout: % -> Void
from JuliaObjectType
- jlApply: (String, %) -> %
from JuliaObjectType
- jlApply: (String, %, %) -> %
from JuliaObjectType
- jlApply: (String, %, %, %) -> %
from JuliaObjectType
- jlApply: (String, %, %, %, %) -> %
from JuliaObjectType
- jlApply: (String, %, %, %, %, %) -> %
from JuliaObjectType
- jlApply: (String, %, %, %, %, %, %) -> %
from JuliaObjectType
- jlApprox?: (%, %) -> Boolean
jlApprox?(x,y)
computes inexact equality comparison with default parameters. Two numbers compare equal if their relative distance or their absolute distance is within tolerance bounds.
- jlApprox?: (%, %, %) -> Boolean
jlApprox?(x,y,atol)
computes inexact equality comparison with absolute toleranceatol
. Two numbers compare equal if their relative distance or their absolute distance is within tolerance bounds.
- jlId: % -> String
from JuliaObjectType
- jllMPFRApply: (JuliaObject, %) -> %
jllMPFRApply(func,x)
applies the function pointerfunc
tox
. It is expected that theC
function modifies the first parameters for the returned value (provided by FriCAS and returned here) and and as a last parameter, the rounding mode. See MPFR. Uses Julia rounding mode, default to nearest. example{mpfr:=jlDlOpen “libmpfr”} example{sym:= jlDlSym(mpfr,jsym(mpfr_gamma))} example{val:=jfloat(“0.7”);} example{jllMPFRApply(sym,val)}=>
1.29805533264755778568117117915281161778… example{jlDlClose(mpfr)}
- jllMPFRApply: (JuliaObject, %, %) -> %
jllMPFRApply(func,x,y)
applies the function pointerfunc
tox
andy
. It is expected that theC
function modifies the first parameters for the returned value (provided by FriCAS and returned here) and and as a last parameter, the rounding mode. See MPFR. Uses Julia rounding mode, default to nearest. example{mpfr:=j lDlOpen “libmpfr”} example{sym:= jlDlSym(mpfr,jsym(mpfr_pow))} example{val:=jfloat(“0.7”);} example{jllMPFRApply(sym,val, jfloat(2))} example{jlDlClose(mpfr)}
- jllMPFRApply: (JuliaObject, %, %, %) -> %
jllMPFRApply(func,x,y,z)
applies the function pointerfunc
tox
,y
andz
. It is expected that theC
function modifies the first parameters for the returned value (provided by FriCAS and returned here) and as a last parameter, the rounding mode (the default mode is used here). See MPFR. Uses Julia rounding mode, default to nearest. example{mpfr:=j lDlOpen “libmpfr”} example{sym:= jlDlSym(mpfr,jsym(mpfr_fma))} example{val:=jfloat(“0.7”);} example{jllMPFRApply(sym,val, jfloat(2), jfloat(5))} example{jlDlClose(mpfr)}
- jlRef: % -> SExpression
from JuliaObjectType
- jlref: String -> %
from JuliaObjectType
- jlType: % -> String
from JuliaObjectType
- latex: % -> String
from SetCategory
- lcmCoef: (%, %) -> Record(llcm_res: %, coeff1: %, coeff2: %)
from LeftOreRing
- leftPower: (%, NonNegativeInteger) -> %
from MagmaWithUnit
- leftPower: (%, PositiveInteger) -> %
from Magma
- leftRecip: % -> Union(%, failed)
from MagmaWithUnit
- log10: % -> %
log10(x)
computes the base 10 logarithm ofx
.
- log1p: % -> %
log1p(x)
computes accurately log(1+x)
- log2: % -> %
log2(x)
computes the base 2 logarithm ofx
.
- log: % -> %
- mantissa: % -> Integer
from FloatingPointSystem
- max: (%, %) -> %
from OrderedSet
- max: () -> % if
from FloatingPointSystem
- min: (%, %) -> %
from OrderedSet
- min: () -> % if
from FloatingPointSystem
- multiEuclidean: (List %, %) -> Union(List %, failed)
from EuclideanDomain
- mutable?: % -> Boolean
from JuliaObjectType
- negative?: % -> Boolean
from OrderedRing
- norm: % -> %
from RealNumberSystem
- nothing?: % -> Boolean
from JuliaObjectType
- nrand: () -> %
nrand()
returns an normally distributed random number.
- nthRoot: (%, Integer) -> %
from RadicalCategory
- one?: % -> Boolean
from MagmaWithUnit
- opposite?: (%, %) -> Boolean
from AbelianMonoid
- order: % -> Integer
from FloatingPointSystem
- patternMatch: (%, Pattern Float, PatternMatchResult(Float, %)) -> PatternMatchResult(Float, %)
from PatternMatchable Float
- pi: () -> %
- plenaryPower: (%, PositiveInteger) -> %
- positive?: % -> Boolean
from OrderedRing
- precision: % -> PositiveInteger
precision(x)
returns the precision ofx
.
- precision: (%, PositiveInteger) -> %
precision(x, p)
returns a copy ofx
with precisionp
.- precision: () -> PositiveInteger
from FloatingPointSystem
- precision: PositiveInteger -> PositiveInteger
from FloatingPointSystem
- principalIdeal: List % -> Record(coef: List %, generator: %)
from PrincipalIdealDomain
- quo: (%, %) -> %
from EuclideanDomain
- recip: % -> Union(%, failed)
from MagmaWithUnit
- rem: (%, %) -> %
from EuclideanDomain
- retract: % -> Fraction Integer
from RetractableTo Fraction Integer
- retract: % -> Integer
from RetractableTo Integer
- retractIfCan: % -> Union(Fraction Integer, failed)
from RetractableTo Fraction Integer
- retractIfCan: % -> Union(Integer, failed)
from RetractableTo Integer
- rightPower: (%, NonNegativeInteger) -> %
from MagmaWithUnit
- rightPower: (%, PositiveInteger) -> %
from Magma
- rightRecip: % -> Union(%, failed)
from MagmaWithUnit
- round: % -> %
from RealNumberSystem
- sample: %
from AbelianMonoid
- sec: % -> %
- sech: % -> %
- sign: % -> Integer
from OrderedRing
- sin: % -> %
- sinh: % -> %
- sizeLess?: (%, %) -> Boolean
from EuclideanDomain
- smaller?: (%, %) -> Boolean
from Comparable
- sqrt: % -> %
from RadicalCategory
- squareFree: % -> Factored %
- squareFreePart: % -> %
- string: % -> String
string(fl)
return the strings representation offl
.
- subtractIfCan: (%, %) -> Union(%, failed)
- tan: % -> %
- tanh: % -> %
- toString: % -> String
from FloatingPointSystem
- toString: (%, NonNegativeInteger) -> String
from FloatingPointSystem
- truncate: % -> %
from RealNumberSystem
- unit?: % -> Boolean
from EntireRing
- unitCanonical: % -> %
from EntireRing
- unitNormal: % -> Record(unit: %, canonical: %, associate: %)
from EntireRing
- urand01: () -> %
urand01()
returns an uniformly distributed random number contained in [0,1].
- wholePart: % -> Integer
from RealNumberSystem
- zero?: % -> Boolean
from AbelianMonoid
Algebra %
ArcTrigonometricFunctionCategory
BiModule(%, %)
BiModule(Fraction Integer, Fraction Integer)
CoercibleFrom Fraction Integer
Module %
NonAssociativeAlgebra Fraction Integer
OrderedCancellationAbelianMonoid
RetractableTo Fraction Integer