Page 1 sur 1

abs() cmd

Publié : lun. oct. 29, 2018 4:05 pm
par compsystems
Hello BP.

Why abs([[-2,1+i,-4]]) returns 4.69041575982 // hp prime sqrt(22)

abs(list[-2,1+i,-4]) returns list[2,sqrt(2),4] // ok
abs([-2,1+i,-4]) returns list[2,sqrt(2),4] // ok


L1 := [ 8, -3.5, 3+4*i, √(-1) ] => [24.0,-10.5,9.0+12.0*i,3.0*i] why it applies approx calculation, to values that are not decimal numbers?

Re: abs() cmd

Publié : mer. oct. 31, 2018 4:27 pm
par parisse
abs on matrices in Xcas probably does a numeric algorithm.

L1 := [ 8, -3.5, 3+4*i, √(-1) ] does not return what you say.