[sage-devel] Re: Rounding in Sage

2020-04-08 Thread Simon King
Hi Samuel, thank you for the interesting sources! Best regards, Simon On 2020-04-08, Samuel Lelievre wrote: > About Sage and floating-point numbers, if I remember correctly, > > - IEEE 754 is not a complete specification, some details are left > up to the implementation and therefore IEEE 754

[sage-devel] Re: Rounding in Sage

2020-04-08 Thread Samuel Lelievre
About Sage and floating-point numbers, if I remember correctly, - IEEE 754 is not a complete specification, some details are left up to the implementation and therefore IEEE 754 compliant computations can vary from machine to machine (depending on processor or OS) - in Sage, `RDF` and `float

[sage-devel] Re: Rounding in Sage

2020-04-07 Thread Simon King
Hi! On 2020-04-07, Thierry wrote: > By the way, an excellent ressource to teach those kind of things and > check carefully what happens is the sign_mantissa_exponent method: > > sage: a = RR(1.1) > sage: a > 1.10 > sage: a.sign_mantissa_exponent() > (1, 4953959590107546, -52) Nice, I

[sage-devel] Re: Rounding in Sage

2020-04-07 Thread Simon King
On 2020-04-07, Thierry wrote: > An appropriate place seems to be : https://ask.sagemath.org/questions/ I will never prefer ask.sagemath over sage-support. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop re

Re: [sage-devel] Re: Rounding in Sage

2020-04-07 Thread Thierry
By the way, an excellent ressource to teach those kind of things and check carefully what happens is the sign_mantissa_exponent method: sage: a = RR(1.1) sage: a 1.10 sage: a.sign_mantissa_exponent() (1, 4953959590107546, -52) Ciao, Thierry On Tue, Apr 07, 2020 at 05:34:44PM +0200

[sage-devel] Re: Rounding in Sage

2020-04-07 Thread Marc Mezzarobba
Hi Simon, Simon King wrote: > According to IEEE 754, the default rounding mode for floating-point > operations is "round half to even". However, in examples it seems that > the rounding roule in RR is: "round half away from zero if the total > number of decimal digits in the result is odd and towa