You said before AlgebraicNumber should represent any branch
of the root, but here we are talking about the sign of radical.

Does that mean we are taking a specific branch interpretation here?

- Qian

On 5/15/24 17:42, Waldek Hebisch wrote:

TrigonometricManipulations (which implements imag) is using
sign$ElementaryFunctionSign to determine if a root is complex.
'sign' may return "failed" and 'imag' treats this the same as
nonnegative, so assumes that root is real.  'sign' for numbers
tries interval approximation.  If precision it too low, then
this fails and 'sign' returns "failed"...

Mathematically determining sign of numbers (which is needed to choose
form of roots) requires numerical computation potentially of much
higher precision than input data.  So there will be a cutoff or
we would run out of memory (or time) in some cases.  So one question
is how hard FriCAS should try, currently FriCAS just uses current
numeric preciion and do not try to escalate.  Another question
is what to do in case of failure.  Honestly FriCAS should return
"failed" or signal error in such case.  'sign' returns "failed"
which IMO is OK.  Probably 'imag' should signal error.  I can
guess that possibly users call 'imag' and related functions
without real need, so lying (as done now) could be a pragmatic
choice.  Or simply this is piece of research code that never
really get finished.


--
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/a4d24015-4613-4526-9e4e-dbd5ba718c60%40gmail.com.

Reply via email to