ArbFloats.ArbFloatsModule

precision(ArbFloat) # show the current default precision setprecision(ArbFloat, 120) # change the current default precision setprecision(ArbFloat, 53+7) # akin to setprecision(BigFloat, 53)

ArbFloat(12) # use the default precision, at run time ArbFloat{200}(12) # use specified precision, at run time ArbFloat(200,"12") # use the specified precision, at run time @ArbFloat(12) # use the default precision, at compile time @ArbFloat(200,12) # use specified precision, at compile time

@ArbFloat(1.2345) == ArbFloat("1.2345")

      remember to do this        and           to avoid this

goodValue = @ArbFloat(1.2345)         wrongValue = ArbFloat(1.2345);
    1.234500000000000000                   1.2344999999999999307

 ArbFloat(12345)/ArbFloat(1000)        ArbFloat(12.345)/ArbFloat(10)
    1.234500000000000000                   1.234500000000000064
setprecision(ArbFloat, 80)

exp1 = exp(ArbFloat(1));
stringsmall(exp1),stringcompact(exp1),string(exp1),stringall(exp1)
> ("2.7182818","2.71828182845905","2.71828182845904523536029","2.71828182845904523536029")
showall_pm(exp1)
> 2.718281828459045235360286±3.3216471534462276e-24
bounds(exp1)
> ( 2.71828182845904523536028,  2.718281828459045235360293 )

setprecision(ArbFloat, 116); # the initial default precision
fuzzed_e = tan(atanh(tanh(atan(exp(one(ArbFloat))))))
> 2.718281828459045235360287
showall(fuzzed_e)
> 2.7182818284590452353602874713527
bounds(fuzzed_e)
> ( 2.718281828459045235360287,   
    2.718281828459045235360287 )
> they are not really the same ...    
lo, hi = bounds(fuzzed_e); showall(lo,hi)
> ( 2.7182818284590452353602874713526543,  
    2.7182818284590452353602874713526701 )

smartstring(fuzzed_e)  
> "2.7182818284590452353602874713527-"
ArbFloats.approxeqMethod

true if it is quite likely that the arguments indicate the same value

ArbFloats.force_positive_contentMethod

forcepositivecontent(x::ArbFloat) returns x without any content <= 0 if x is strictly <= 0, returns eps(lowerbound(x))

ArbFloats.isoneMethod

true iff midpoint(x) is one and radius(x) is zero

ArbFloats.midpoint_precisionMethod

Returns the number of bits needed to represent the absolute value of the mantissa of the midpoint of x, i.e. the minimum precision sufficient to represent x exactly. Returns 0 if the midpoint of x is a special value.

ArbFloats.nonzeroMethod

true iff zero is not within [upperbound(x), lowerbound(x)]

ArbFloats.notoneMethod

true iff midpoint(x) is not one or midpoint(x) is one and radius(x) is nonzero

ArbFloats.relative_accuracyMethod

Returns the effective relative accuracy of x measured in bits, equal to the negative of the return value from relativeError().

ArbFloats.relative_errorMethod

Returns the effective relative error of x measured in bits, defined as the difference between the position of the top bit in the radius and the top bit in the midpoint, plus one. The result is clamped between plus/minus ARFPRECEXACT.

ArbFloats.trimmedMethod

Sets y to a trimmed copy of x: rounds x to a number of bits equal to the accuracy of x (as indicated by its radius), plus a few guard bits. The resulting ball is guaranteed to contain x, but is more economical if x has less than full accuracy.

Base.iszeroMethod

midpoint(x) and radius(x) are zero

ArbFloats.pfpMethod

positionfirstplace determine the position of the most significant nonzero bit|digit

ArbFloats.pfp10Method

decimal positionfirstplace determine the position of the most significant nonzero digit

ArbFloats.pfp2Method

binary positionfirstplace determine the position of the most significant nonzero bit

ArbFloats.tidyMethod

Rounds x to a clean estimate of x as a point value.

ArbFloats.trimMethod

Rounds x to a number of bits equal to the accuracy of x (as indicated by its radius), plus a few guard bits. The resulting ball is guaranteed to contain x, but is more economical if x has less than full accuracy. (from arb_trim documentation)

ArbFloats.ufpFunction

ufp is unitfirstplace the float value given by a 1 at the position of the most significant nonzero bit|digit in x

ArbFloats.ulpMethod

ulp is unitlastplace the float value given by a 1 at the position of the least significant nonzero bit|digit in x

Base.Math.frexpMethod

x.midpoint -> (significand, exponentOf2) [0.5,1.0) 2^expo x.radius -> (radial significand, radial exponentOf2)

Base.isfiniteMethod

Returns nonzero iff the midpoint and radius of x are both finite floating-point numbers, i.e. not infinities or NaN.

Base.isintegerMethod

true iff midpoint(x) is an integer and radius(x) is zero