[Scilab-users] slash (/) help page confusing ?
philippe
rouxph.22 at gmail.com
Thu Aug 30 09:32:36 CEST 2018
Hi
before scilab6 there was some ambiguity between 1/B=1./B=(1.)/B since
1. = 1 for floating point real numbers. We can see that this problem is
solved now :
--> B=1:3
B =
1. 2. 3.
--> 1./B
ans =
1. 0.5 0.3333333
--> 1/B
ans =
0.0714286
0.1428571
0.2142857
but in the help page it is written that "X=A/B is the solution of X*B=A"
this false for A=1 and B=1:3 as you can see :
--> B*(1/B) // =1 !!!!
ans =
1.
--> (1/B)*B // should be 1 ?
ans =
0.0714286 0.1428571 0.2142857
0.1428571 0.2857143 0.4285714
0.2142857 0.4285714 0.6428571
but this is true for general matrix
--> A=[1 2 ; 3 4]
A =
1. 2.
3. 4.
--> B=[4 5 ; 6 7]
B =
4. 5.
6. 7.
--> B*(A/B) // sould be A ?
ans =
17.5 -8.5
25.5 -12.5
--> (A/B)*B // =A
ans =
1. 2.
3. 4.
this looks confusing ?
Best regards,
Philippe
More information about the users
mailing list