#8495: Regression: Many mathematica doctests now fail
------------------------------------------+---------------------------------
Reporter: flawrence | Owner: flawrence
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: interfaces | Keywords:
Author: Felix Lawrence | Upstream: N/A
Reviewer: Mike Hansen, Burcin Erocal | Merged:
Work_issues: |
------------------------------------------+---------------------------------
Changes (by flawrence):
* status: needs_info => needs_review
Old description:
> Since #3587, which implements a _sage_() method for mathematica elements,
> many mathematica doctests fail. E.g:
>
> {{{
> sage: def math_bessel_K(nu,x):
> ... return mathematica(nu).BesselK(x).N(20).sage()
> ...
> sage: math_bessel_K(2,I)
> NotImplementedError: Unable to parse
> Mathematica output:
> -2.5928861754911969781676606702635284285719718407749199115289`20.1494653502
> 82203
> +
> 0.1804899720669620266296208808560650432663536549483055754141`18.99213497581
> 376*i
>
> }}}
New description:
Since #3587, which implements a _sage_() method for mathematica elements,
many mathematica doctests fail. E.g:
{{{
sage: def math_bessel_K(nu,x):
... return mathematica(nu).BesselK(x).N(20).sage()
...
sage: math_bessel_K(2,I)
NotImplementedError: Unable to parse
Mathematica output:
-2.5928861754911969781676606702635284285719718407749199115289`20.1494653502
82203
+
0.1804899720669620266296208808560650432663536549483055754141`18.99213497581
376*i
}}}
apply only `trac_8495-rewrite-_sage_.patch`
--
Comment:
ARGH! I upgraded to 4.6.2 (from 4.6.1), ran the tests and get the same
errors as Dave.
#9032 modified Sage's .n(), and added (in two files)
{{{
n = numerical_approx
N = n
}}}
This means that Mathematica's `N[]` is no longer being called - instead
Sage's `numerical_approx()` is being called, and it can't handle certain
mma objects. Furthermore the argument taken by `numerical_approx` is the
number of bits (I think?) whereas `N[50]` gives 50 sig figs.
I think that the way to fix this is by adjusting precedences so that on
mathematica objects, mathematica functions take priority. I also think
that fixing this is beyond the scope of this ticket (which was a rewrite
of `._sage_`). I have created a new ticket regarding this issue: #10968
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8495#comment:22>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.