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

2019-09-12 Thread Stéphane Mottelet
Le 12/09/2019 à 11:55, Antoine ELIAS a écrit : Hello Stéphane, In Scilab 6.0.2 without format("e", 24) --> h = %eps/128, x0=%pi/4  h  =    1.735D-18  x0  =    0.7853982 --> (cos(x0+h)-cos(x0-h))/2/h  ans  =    0. --> cos(x0+%i*h)  ans  =    0.7071068 --> imag(cos(x0+%i*h))/h  ans  =  

[Scilab-users] display of complex/not real numbers, again

2019-09-12 Thread Stéphane Mottelet
Hello all, The subject has been already discussed a lot but I would like it to be discussed again because I now have a real rationale to promote a change in the way complex numbers with small imaginary part are displayed. I don't know if some of you were aware of the clever technique of

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

2019-09-12 Thread Antoine ELIAS
Hello Stéphane, In Scilab 6.0.2 without format("e", 24) --> h = %eps/128, x0=%pi/4  h  =    1.735D-18  x0  =    0.7853982 --> (cos(x0+h)-cos(x0-h))/2/h  ans  =    0. --> cos(x0+%i*h)  ans  =    0.7071068 --> imag(cos(x0+%i*h))/h  ans  =   -0.7071068 --> -sin(x0)  ans  =   -0.7071068 It

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

2019-09-12 Thread Dang Ngoc Chan, Christophe
Hello, > De la part de Stéphane Mottelet > Envoyé : jeudi 12 septembre 2019 10:26 > > I now have a real rationale to promote a change in > the way complex numbers with small imaginary part are displayed. I agree with you. I would add another advantage: the user is not always aware that the

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

2019-09-12 Thread Stéphane Mottelet
Le 12/09/2019 à 14:19, Dang Ngoc Chan, Christophe a écrit : Hello, De la part de Stéphane Mottelet Envoyé : jeudi 12 septembre 2019 10:26 I now have a real rationale to promote a change in the way complex numbers with small imaginary part are displayed. I agree with you. I would add

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

2019-09-12 Thread Stéphane Mottelet
I prefer the display after applying https://codereview.scilab.org/#/c/20981/: --> x0=%pi/4;h=%eps/2  h  =    1.110D-16 --> cos(x0+%i*h)  ans  =    0.7071068 - 7.850D-17i However, we could discuss if the arbitrary switch to "e" mode is desirable or not, but since Scilab 6.0 we have got used