rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

`rectform` ignores the `domain` setting #3651

Open rtoy opened 1 month ago

rtoy commented 1 month ago

Imported from SourceForge on 2024-07-08 10:33:00 Created by charpent on 2021-03-15 10:14:51 Original: https://sourceforge.net/p/maxima/bugs/3747


Inspiration : see Sagemath's ticket 6862

rectform treats variables as real, not as indicated by the domain default :

(%i1) display2d:false;

(%o1) false
(%i2) domain:complex;

(%o2) complex
(%i3) c:a+%i*b;

(%o3) %i*b+a
(%i4) realpart(c);

(%o4) a

However, rectform does its job correctly provided that the variables are explicitly declared complex :

(%i5) declare(a, complex, b, complex);

(%o5) done
(%i6) realpart(c);

(%o6) 'realpart(a)-'imagpart(b)

I didn't (yet) check for other cases.

rtoy commented 1 month ago

Imported from SourceForge on 2024-07-08 10:33:01 Created by macrakis on 2021-03-17 15:11:58 Original: https://sourceforge.net/p/maxima/bugs/3747/#d9ca