sci2exp(complex([1 1], [%nan %inf])) is not correctly evaluable
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
sci2exp(complex([1 1], [%nan %inf])) is not correctly evaluable:
--> c = complex([1 1], [%nan %inf])
c =
1. + Nani 1. + Infi
--> s = sci2exp(c)
s =
[1+%i*%nan,1+%i*%inf]
--> v = evstr(s)
v =
Nan + Nani Nan + Infi
--> c==c
ans =
F T
The evaluation is correct, but the string to evaluate is not so.
When there are Nan or Inf in its imag(input), sci2exp() should use complex() in its output.
ERROR LOG:
----------
None. Unusable result.
HOW TO REPRODUCE THE BUG:
-------------------------
c = complex([1 1], [%nan %inf])
s = sci2exp(c)
v = evstr(s)
c==c
OTHER INFORMATION:
------------------
Was already in Scilab 5