[ast] improve display of (complex) polymomials and rationals 42/21142/10
authorStéphane MOTTELET <stephane.mottelet@utc.fr>
Wed, 27 Nov 2019 15:59:23 +0000 (16:59 +0100)
committerClément DAVID <clement.david@esi-group.com>
Mon, 9 Dec 2019 12:25:45 +0000 (13:25 +0100)
commit0000af49132e6df2fc907e4b83d57d7c0dceb582
tree9530fa0e9acf20a4fda45d015f70427b703f44b3
parent652361d964ce7c1c50655339d14689e419fa737a
[ast] improve display of (complex) polymomials and rationals

--> p=(1+%i+%s)^7
 p  =

 8-8i -56is -(84+84i)s² -140s³ -(70-70i)s⁴ +42is⁵ +(7+7i)s⁶ +s⁷

--> p=1./[%s %s^2; (%s+1+%i)^2 %s^4] + %s+%i
 p  =

           1 +is +s²          1 +is² +s³
           ─────────          ──────────
               s                  s²

   -1 -(2-4i)s +(2+3i)s² +s³  1 +is⁴ +s⁵
   ─────────────────────────  ──────────
        2i +(2+2i)s +s²           s⁴

Change-Id: If3c4cc35cc7f4e02fe48b5d8f8acd07495501147
scilab/modules/ast/includes/types/singlepoly.hxx
scilab/modules/ast/src/cpp/types/polynom.cpp
scilab/modules/ast/src/cpp/types/singlepoly.cpp
scilab/modules/overloading/macros/%r_p.sci
scilab/modules/overloading/macros/%r_string.sci
scilab/modules/string/sci_gateway/cpp/sci_string.cpp