Skip to content

fix additional "Fortran-style" names and a coercion (depends on #4036) #4633

@sagetrac-bpage

Description

@sagetrac-bpage

In order to run the the comparison of integration results between FriCAS and Maxima, it is also necessary to make some simple additions to the 'axiom.py' interface:

wspage@debian:~/sage-3.1.4/devel/sage-main/sage/interfaces$ hg diff
diff -r ed3f78f99d2a sage/interfaces/axiom.py
--- a/sage/interfaces/axiom.py  Tue Nov 25 23:45:43 2008 -0500
+++ b/sage/interfaces/axiom.py  Wed Nov 26 19:43:59 2008 -0500
@@ -729,7 +729,10 @@
        s = P.eval('unparse(%s::InputForm)'%self._name)
        if 'translation error' in s or 'Cannot convert' in s:
            raise NotImplementedError
-        s = multiple_replace({'\r\n':'', # fix stupid Fortran-ish
+        s = multiple_replace({'\r\n':'', # fix stupid Fortran-ish
+                              'DLOG(':'log(',
+                              'DEXP(':'exp(',
+                              '::(':'', ',Symbol)':'',
                              'DSIN(':'sin(',
                              'DCOS(':'cos(',
                              'DTAN(':'tan(',


Integration produce some additional "Fortran-style" names and a
coercion that have to be translated before the input form can be
processed by Sage.

With this change we can do:

  test_int = integrand.integrate(x)
  fricas_int = axiom.integrate(integrand,x).sage()
  fricas_cmp = (test_int.simplify_full()-fricas_int.simplify_full()).simplify_full()
  if (fricas_cmp == 0):
      print "FriCAS agrees with Maxima."

Component: interfaces

Keywords: axiom

Reviewer: Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/4633

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions