#8495: Regression: Many mathematica doctests now fail
------------------------------+---------------------------------------------
   Reporter:  flawrence       |       Owner:  flawrence   
       Type:  defect          |      Status:  needs_review
   Priority:  major           |   Milestone:  sage-4.5.2  
  Component:  interfaces      |    Keywords:              
     Author:  Felix Lawrence  |    Upstream:  N/A         
   Reviewer:  Mike Hansen     |      Merged:              
Work_issues:                  |  
------------------------------+---------------------------------------------

Comment(by flawrence):

 Replying to [comment:5 mhansen]:
 > There is dictionary in place from Mathematica to Sage.
 >
  {{{
 sage: sage.symbolic.pynac.symbol_table['mathematica']
 {'Log[2]': log2, 'Cos': cos, 'DiracDelta': dirac_delta, 'EulerGamma':
 euler_gamma, 'Glaisher': glaisher, 'Sqrt': <function sqrt at 0x2c20f50>,
 'Factorial': factorial, 'Khinchin': khinchin, 'Catalan': catalan,
 '(1+Sqrt[5])/2': golden_ratio, 'Binomial': binomial, 'PolyGamma': psi,
 'HeavisideTheta': heaviside, 'KroneckerDelta': kronecker_delta, 'Pi': pi,
 'UnitStep': unit_step, 'Sin': sin, 'Gamma': gamma, 'Sign': sgn}
 }}}

 Excellent! I've updated the patch so that it uses that dictionary.  I also
 added the ability to pass a locals dictionary to _sage_, which complements
 and/or overrides the symbol_table['mathematica'] dictionary.

 The documentation for this function won't be very visible, since it starts
 with an underscore, so I was contemplating setting up a mathematica-
 specific .sage function that accepts a locals dictionary and has a copy of
 this documentation.  In the end I didn't do this because I don't
 understand the consequences (or why there are separate _sage_ and sage
 functions at all).  Opinions?

 Replying to [comment:6 whuss]:
 >On 32-bit Debian I get the same output. There is only one doctest
 failure:

 >But this is probably unrelated to this patch, since also without this
 patch applied I get things like:

 Yes, I'm not sure it's related to the patch either.  For the record I get
 the correct behaviour with the patch:
 {{{
 sage: mathematica('N[Pi, 1]')
 3.1
 sage: mathematica('N[Pi, 10]')
 3.1415926536
 sage: mathematica('N[Pi, 11]')
 3.14159265359
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8495#comment:7>
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.

Reply via email to