[Scilab-users] Problems arising from truncation of %pi

Jean-Yves Baudais Jean-Yves.Baudais at insa-rennes.fr
Fri Jan 8 13:28:22 CET 2021


----- Original Message -----
> From: "Stéphane Mottelet" 
> --> bitstring(%pi)
> ans =
> 
> "0 10000000000 1001001000011111101101010100010001000010110100011000"
> [...]
> https://www.exploringbinary.com/binary-converter/


Thank you for the recall on floating point representation and for the link (the French wiki page on IEEE 754 gives also a full and clear example). Of course we can convert float64 from finite binary representation to decimal one with more than 16 digits, but in that case the binary to float tranform is not a "relation binaire univoque" and the finite number representation problem is "put under the carpet". As I prefer one-to-one convertion and I hate carpet, I use 16 digits at most to write float64.

-- Jean-Yves


More information about the users mailing list