Re: [Scilab-users] {EXT} Re: display of complex/not real numbers, again

2019-09-17 Thread Federico Miyara
Stéphane, Let me give the following rationale. When parsing with msscanf we get --> msscanf("1.60009","%lf")==1.6  ans  =   T but --> msscanf("1.70018","%lf")==1.7  ans  =   F The actual display algorithm does not use msscanf but a cross-platform code (msscanf

Re: [Scilab-users] {EXT} Re: display of complex/not real numbers, again

2019-09-17 Thread Stéphane Mottelet
Le 17/09/2019 à 15:33, Stéphane Mottelet a écrit : Le 17/09/2019 à 15:20, Federico Miyara a écrit : Dear all, I think that saying that 1.70018 should be represented as 1.700 and that representing it as 1.7 instead is dishonest seems a bit too much for me. What about

Re: [Scilab-users] {EXT} Re: display of complex/not real numbers, again

2019-09-17 Thread Stéphane Mottelet
Le 17/09/2019 à 15:20, Federico Miyara a écrit : Dear all, I think that saying that 1.70018 should be represented as 1.700 and that representing it as 1.7 instead is dishonest seems a bit too much for me. What about 1.712345649? With the available decimal

Re: [Scilab-users] {EXT} Re: display of complex/not real numbers, again

2019-09-17 Thread Federico Miyara
Dear all, I think that saying that 1.70018 should be represented as 1.700 and that representing it as 1.7 instead is dishonest seems a bit too much for me. What about 1.712345649? With the available decimal places you would represent it as 1.7123456 Wouldn't

Re: [Scilab-users] {EXT} Re: display of complex/not real numbers, again

2019-09-16 Thread Stéphane Mottelet
> Le 16 sept. 2019 à 09:25, Dang Ngoc Chan, Christophe > a écrit : > > Hello, > >> De : Stéphane Mottelet >> Envoyé : vendredi 13 septembre 2019 17:57 >>> >>> --> x=(1:0.1:2); bitstring(x(8)), bitstring(1.7) >>> ans = >>> >>>

Re: [Scilab-users] {EXT} Re: display of complex/not real numbers, again

2019-09-16 Thread Dang Ngoc Chan, Christophe
Hello, > De : Stéphane Mottelet > Envoyé : vendredi 13 septembre 2019 17:57 > > > > --> x=(1:0.1:2); bitstring(x(8)), bitstring(1.7) > > ans = > > > > 00111011001100110011001100110011001100110011001100110100 > > > > ans = > > > >

Re: [Scilab-users] {EXT} Re: display of complex/not real numbers, again

2019-09-13 Thread Stéphane Mottelet
Le 13/09/2019 à 15:28, Dang Ngoc Chan, Christophe a écrit : Hello, De : Stéphane Mottelet Envoyé : vendredi 13 septembre 2019 15:22 1.7 cannot be stored exactly in IEEE754 Yes, but there is an "infinite" amount of decimal numbers that cannot be stored exactly in IEEE754. I know... so what ?

Re: [Scilab-users] {EXT} Re: display of complex/not real numbers, again

2019-09-13 Thread Dang Ngoc Chan, Christophe
Hello, > De : Stéphane Mottelet > Envoyé : vendredi 13 septembre 2019 15:22 > > 1.7 cannot be stored exactly in IEEE754 Yes, but there is an "infinite" amount of decimal numbers that cannot be stored exactly in IEEE754. -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This

Re: [Scilab-users] {EXT} Re: display of complex/not real numbers, again

2019-09-13 Thread Stéphane Mottelet
Le 13/09/2019 à 15:13, Dang Ngoc Chan, Christophe a écrit : Hello, De : Stéphane Mottelet Envoyé : vendredi 13 septembre 2019 14:23 I think that we do agree about the fact that the actual Scilab display [...] --> x(8) ans = 1.7 --> x(8)-1.7 ans = 2.220D-16 is pretty but not

Re: [Scilab-users] {EXT} Re: display of complex/not real numbers, again

2019-09-13 Thread Dang Ngoc Chan, Christophe
Hello, > De : Stéphane Mottelet > Envoyé : vendredi 13 septembre 2019 14:23 > > I think that we do agree about the fact that the actual Scilab display > [...] > --> x(8) > ans = > > 1.7 > --> x(8)-1.7 > ans = > > 2.220D-16 > is pretty but not correct/homogeneous/honest I don't agree about