Nick Alexander wrote:
On 8-Mar-10, at 6:03 PM, Dr. David Kirkby wrote:
I'm a bit puzzled by this one:
sage: def math_bessel_K(nu,x):
... return mathematica(nu).BesselK(x).N(20).sage()
...
sage: math_bessel_K(2,I) # optional - mathematica
0.180489972066962*I - 2.592886175491197 # 32-bit
-2.592886175491196978 + 0.1804899720669620266*I # 64-bit
What is supposed to be 32 or 64-bit ? Sage or Mathematica?
In this case, the # XXX-bit flag refer to whatever environment sage
thinks it is executing in.
I had this issue with Mathematica on multiple machines, and just wrote
sage: complex.Real, complex.Imag() to force the order and not deal with
Mathematica's formatting at all.
Someone sent me by private email the output from Version 5.2 of Mathematica on
Windows. That was 32-bit, and it had the real before the imaginary component. A
book based on version 3 of Mathematica shows the real before the imaginary.
I'm not saying it might not be possible to configure Mathematica to output some
weird way, but it is far from the norm, and certainly has nothing to do whether
Mathematica is 32-bit or 64-bit.
In this example, isn't the sage() function supposed to convert this to a
sage data type, which has fixed order printing on all architectures?
I don't know what it is supposed to do. If you can write an improvement (just as
a reply in this email), I'll create a trac ticket and patch for it.
I notice many packages have the version information available
gap_version
gp_version
kash_version
magma_version
matlab_version
octave_version
qepcad_version
r_version
sage0_version
singular_version
version
but Mathematica is not one of them. That is quite easy to get too.
Nick
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org