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.

I'm puzzled why Mathematica would ever show the imaginary part of a complex number before the real part. I can't ever recall that. I've lost my Book Mathematica from Wolfram based on version 1, but I have a book on Mathematica 3.0. That was well before the time of a 64-bit version of Mathematica, yet the real part is shown before the imaginary. It seems the most logical.


Anyway, for whatever reason, the doc test is failing. I'd like to know if there is a function to find out if Mathematica is 32-bit or 64-bit, but I'm not convinced that 32-bit versions show the imaginary component first. It's never been my experience.

dave

--
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

Reply via email to