William Stein wrote: > > Test like your suggestion above would make perfect sense as unittests > or in the context of randomized testing. Those are great, there are > some in Sage, but they serve a different purpose than doctests. > > William >
As a matter of interest, I wrote a few lines of Mathematica, to write to a binary file the value of the constant E and the machine precision number Exp[1.0] on a SPARC with Mathematica 7. I then used the unix tool 'od' to dump the hexadecimal values. Sure enough, Mathematica too shows a one bit difference between E and Exp[1.0]. Mathematica 7.0 for Sun Solaris SPARC (64-bit) Copyright 1988-2009 Wolfram Research, Inc. In[1]:= BinaryWrite["exp1.dat",Exp[1.0],"Real64"] Out[1]= exp1.dat In[2]:= !od -t x2 exp1.dat 0000000 4005 bf0a 8b14 576a 0000010 In[2]:= BinaryWrite["E.dat",E,"Real64"] Out[2]= E.dat In[3]:= !od -t x2 E.dat 0000000 4005 bf0a 8b14 5769 0000010 Note how the last byte has changed from 69 to 6a. There's probably a much better way of showing the data in Mathematica, but using 'od' was the easiest solution I could think of. I also tried the same with the Solaris x86 version of Mathematica. No such change occurs then. Apart from the order of the bytes are swapped (SPARC is big endian, x86 is little endian), the Solaris x86 date for Exp[1.0] is the same as for the constant E. 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