Post Reply 
XCAS float precision
10-04-2018, 09:36 PM
Post: #3
RE: XCAS float precision
(10-04-2018 07:22 PM)parisse Wrote:  Xcas is using longfloats (via MPFR) for representation of floats having more than 14 digits.

Thanks you. It now make sense.

pibf := 3.141592653589793 // bigfloat
pi53 := 3.141592653 + 5.89793-10 // machine float

evalf(pibf, 20) => 3.1415926535897928940 // big float confirmed
evalf(pi53, 20) => 3.14159265359 // pi53 is 0.5 ULP bigger than pibf

It seems when big float mixed with machine float, big-float is "demoted".

evalf(pibf + 0.0, 20) => 3.14159265359
pibf - pi53 //==> 0.0

pibf == pi53 //==> true, big float demoted before comparison.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
XCAS float precision - Albert Chan - 10-04-2018, 02:52 PM
RE: XCAS float precision - parisse - 10-04-2018, 07:22 PM
RE: XCAS float precision - Albert Chan - 10-04-2018 09:36 PM
RE: XCAS float precision - parisse - 10-05-2018, 06:04 PM



User(s) browsing this thread: 1 Guest(s)