JuliaFloat32¶
julia.spad line 94 [edit on github]
JuliaFloat32 implements 32 bits floating point arithmetic using Julia Float32
type. Bear in mind that, like JuliaInt64
, the internal representation depends on the underlying Lisp implementation, so the usual pure arithmetic operations occur there. For other functions like sqrt, log, exp, transcendental functions etc. the computation is performed at machine level (generally in C
language, or even using assembly language).
- 0: %
from AbelianMonoid
- 1: %
from MagmaWithUnit
- *: (%, %) -> %
from Magma
- *: (%, Fraction Integer) -> %
from RightModule Fraction 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
- <=: (%, %) -> Boolean
from PartialOrder
- <: (%, %) -> Boolean
from PartialOrder
- >=: (%, %) -> Boolean
from PartialOrder
- >: (%, %) -> Boolean
from PartialOrder
- ^: (%, %) -> %
- ^: (%, Fraction Integer) -> %
from RadicalCategory
- ^: (%, 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
- catalan: () -> %
catalan()
return the Catalan's
constant.
- ceiling: % -> %
from RealNumberSystem
- characteristic: () -> NonNegativeInteger
from NonAssociativeRing
- coerce: % -> %
from Algebra %
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- coerce: Fraction Integer -> %
- coerce: Integer -> %
from NonAssociativeRing
- 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
- convert: DoubleFloat -> %
- convert: JuliaFloat64 -> %
- cos: % -> %
- cosh: % -> %
- cot: % -> %
- coth: % -> %
- csc: % -> %
- csch: % -> %
- D: % -> %
from DifferentialRing
- D: (%, NonNegativeInteger) -> %
from DifferentialRing
- differentiate: % -> %
from DifferentialRing
- differentiate: (%, NonNegativeInteger) -> %
from DifferentialRing
- digits: () -> PositiveInteger
from FloatingPointSystem
- divide: (%, %) -> Record(quotient: %, remainder: %)
from EuclideanDomain
- euclideanSize: % -> NonNegativeInteger
from EuclideanDomain
- eulerGamma: () -> %
eulerGamma()
returns the Euler's
constant gamma (γ
).
- exp: % -> %
- exp: () -> %
exp()
returns theJuliaFloat32
ℯ
(%e
or exp(1)).
- expm1: % -> %
expm1(x)
computes accurately e^x-1.
- 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
- float: (Integer, Integer) -> %
from FloatingPointSystem
- float: (Integer, Integer, PositiveInteger) -> %
from FloatingPointSystem
- floor: % -> %
from RealNumberSystem
- fractionPart: % -> %
from RealNumberSystem
- gcdPolynomial: (SparseUnivariatePolynomial %, SparseUnivariatePolynomial %) -> SparseUnivariatePolynomial %
from GcdDomain
- goldenRation: () -> %
goldenRation()
returns the golden ratio.
- inv: % -> %
from DivisionRing
- jf32: DoubleFloat -> %
jf32(x)
coercesx
to a JuliaFloat32
.
- jf32: Integer -> %
jf32(i)
coercesi
to a JuliaFloat32
.
- jf32: JuliaFloat64 -> %
jf32(x)
coercesx
to a JuliaFloat32
.
- jlApply: (String, %) -> %
jlApply(func, x)
appliesfunc
to argumentx
.
- jlApply: (String, %, %) -> %
jlApply(func, x, y)
appliesfunc
to argumentsx
andy
.
- jlApply: (String, %, %, %) -> %
jlApply(func, x, y, z)
appliesfunc
to argumentsx
,y
andz
.
- 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.
- jlCApply: (String, JuliaSymbol, %) -> %
jlCApply(lib, func, x)
applies theC
functionfunc
from the librarylib
to argumentx
. For example: example{jlCApply(“libm.so.6”,jsym(sqrt),jf32(2.0))}
- jlCApply: (String, JuliaSymbol, %, %) -> %
jlCApply(lib, func, x, y)
applies theC
functionfunc
from the librarylib
to argumentsx
andy
. For example: example{jlCApply(“libopenlibm”, jsym(pow),2.7,3.0)} OpenLibm library is provided by Julia.
- jlCApply: (String, JuliaSymbol, %, %, %) -> %
jlCApply(lib, func, x, y, z)
applies theC
functionfunc
from the librarylib
to argumentsx
,y
andz
. For example if you have the GNU Scientific Library (GSl
-2.8) installed: example{jlCApply(“libgsl.so.28”,jsym(gsl_hypot3),2.0,7.0,9.0)}
- 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
.
- log2: % -> %
log2(x)
computes the base 2 logarithm ofx
.
- log: % -> %
- mantissa: % -> Integer
from FloatingPointSystem
- max: (%, %) -> %
from OrderedSet
- max: () -> % if % hasn’t arbitraryExponent and % hasn’t arbitraryPrecision
from FloatingPointSystem
- min: (%, %) -> %
from OrderedSet
- min: () -> % if % hasn’t arbitraryExponent and % hasn’t arbitraryPrecision
from FloatingPointSystem
- multiEuclidean: (List %, %) -> Union(List %, failed)
from EuclideanDomain
- nan: () -> %
nan()
returns the JuliaFloat32
NaN (not a number) constant.
- negative?: % -> Boolean
from OrderedRing
- negativeInfinity: () -> %
negativeInfinity()
returns the JuliaFloat32
negtive infinity constant.
- norm: % -> %
from RealNumberSystem
- nrand: () -> %
nrand()
returns a 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
- positiveInfinity: () -> %
positiveInfinity()
returns the JuliaFloat32
positive infinity constant.
- precision: () -> 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(x)
stringify(x
) using default format. See jlF32Format(String).
- 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