even better interoperability

14 views
Skip to first unread message

Martin R

unread,
Feb 16, 2019, 2:05:55 PM2/16/19
to FriCAS - computer algebra system
Dear all!

first of all, a big thank you for providing 1.3.5 and your cooperation concerning InputForm!  I sincerely hope that having more of FriCAS features exposed in sage will sparkle also more interest in FriCAS itself, especially where it shines!

Now the next question: recently, the following bug was found:

(1) -> integrate((%i*a*tan(d*x + c) + a)^3*tan(d*x + c), x)
 
   >> System error:
   arithmetic error DIVISION-BY-ZERO signalled
Operation was /, operands (-2 0).

While the real difficulty seems to be tricky to fix (see https://groups.google.com/forum/#!topic/fricas-devel/TaduS9mswqE), what I am asking for now is something much simpler: could we have an ioHook for these messages?

I think an easy fix would be as follows.

All the best and thanks again!

Martin

diff --git a/src/interp/g-error.boot b/src/interp/g-error.boot
index e816e096..ce7c5175 100644
--- a/src/interp/g-error.boot
+++ b/src/interp/g-error.boot
@@ -151,6 +151,7 @@ sayErrorly(errorLabel, msg) ==
   sayErrorly1(errorLabel, msg)
 
 sayErrorly1(errorLabel, msg) ==
+  ioHook("startKeyedMsg", errorLabel, msg)
   sayBrightly '" "
   if $testingSystem then sayMSG $testingErrorPrefix
   sayBrightly ['"   >> ",errorLabel,'":"]
@@ -158,6 +159,7 @@ sayErrorly1(errorLabel, msg) ==
   msg is ['mathprint, mathexpr] =>
     mathprint mathexpr
   sayBrightly msg
+  ioHook("endOfKeyedMsg", errorLabel)



Ralf Hemmecke

unread,
Feb 16, 2019, 4:23:16 PM2/16/19
to fricas-devel
> what I am asking for now is something much simpler: could we have an ioHook
> for these messages?

I support an additional ioHook, but your patch does not seem right.
Doesn't

msg is ['mathprint, mathexpr] => ...

exit this function before the ending hook?

Ralf

Martin R

unread,
Feb 16, 2019, 4:42:55 PM2/16/19
to FriCAS - computer algebra system
Very likely - thanks for spotting the mistake!

Martin
Reply all
Reply to author
Forward
0 new messages