#8983: erf(0) should return 0
---------------------------------------------+------------------------------
   Reporter:  rossk                          |          Owner:  RossK         
       Type:  enhancement                    |         Status:  needs_review  
   Priority:  minor                          |      Milestone:  sage-5.0      
  Component:  symbolics                      |       Keywords:  erf, beginner 
Work_issues:                                 |       Upstream:  N/A           
   Reviewer:  Burcin Erocal, Douglas McNeil  |         Author:  Benjamin Jones
     Merged:                                 |   Dependencies:                
---------------------------------------------+------------------------------
Changes (by burcin):

  * reviewer:  => Burcin Erocal, Douglas McNeil


Comment:

 Thanks for the patch Benjamin. It looks great and gets the job done.
 However, I'd be much happier if there were a couple more doctests. There
 are quite a few branches in the new `_eval_()` function, but the patch
 adds only one doctest.

 One more suggestion: It might be better to leave the last `return None`
 statement outside the `if`s. IMHO, the following is more compact and
 readable.

 {{{
 if not isinstance(x, Expression):
     if is_inexact(x):
         return self._evalf_(x, parent=parent(x))
     elif x == 0:
         return x
 elif x.is_trivial_zero():
         return x
 return None
 }}}

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