* Bug 16197 fixed: decomplexify result of extraction when applicable 90/21090/6
authorSt├ęphane MOTTELET <stephane.mottelet@utc.fr>
Wed, 18 Sep 2019 13:21:08 +0000 (15:21 +0200)
committerAntoine ELIAS <antoine.elias@esi-group.com>
Sun, 19 Jan 2020 11:48:03 +0000 (12:48 +0100)
commit55ed98486045d5c7e40b58971ea4c87d300f5ba5
tree2a210781728e2bf5b7be5569fd2cba573d2c75ce
parentb04f7352789b487bed0b3f19cf8ea16782d44735
* Bug 16197 fixed: decomplexify result of extraction when applicable

https://bugzilla.scilab.org/show_bug.cgi?id=16197

If after extraction imaginary parts of result are all zero then result
is decomplexified. The patch does not interfer with other features like

--> x=complex(zeros(3,1)) // no extraction here
 x  =

   0.
   0.
   0.

--> isreal(x)
 ans  =

  F

but it allows the intuive behaviors below:

--> p=poly([1 1 1 1],"x","coeff"); r=roots(p)
 r  =

   1.i
  -1.i
  -1.

--> isreal(r(3))
 ans  =

  T

Change-Id: Ieed42028fbe36540a549f6f3d3dd7325c370a210
scilab/CHANGES.md
scilab/modules/ast/src/cpp/types/arrayof.cpp
scilab/modules/ast/tests/nonreg_tests/bug_16197.tst [new file with mode: 0644]