Cool, Qian!

You are a genius. You seem to have digged out the right place.

Now, of course, the question is how to condition that part.
For

  map(x+->(real x + sqrt(-1)@AN*imag(x)), z)

to work R must provide "real" and "imag" and
their target should be coercible to AN.

I think, just testing "R is Complex Integer" or
"R is Complex Fraction Integer" would already be
quite some progress in my eyes.

I only hope that this does not change the behaviour of the interpreter too much so that, i.e. the interpreter shouldn't invest time in trying to needlessly coerce something to AN.

Ralf


On 3/22/24 13:59, Qian Yun wrote:
Line 615 of expr.spad.

(Related function: smp2an, k2an, R2AN).

- Qian

On 3/22/24 20:57, Ralf Hemmecke wrote:
Maybe this signature
   retractIfCan : % -> Union(AlgebraicNumber,"failed")
should support it, when % is EXPR COMPLEX INT.

Implemented where?

Ralf



--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/9263c19a-ce19-49be-bedd-a6ce965ab657%40hemmecke.org.

Reply via email to