#2452: [with patch, needs work] Heaviside step function, Dirac delta needed
-------------------------+--------------------------------------------------
 Reporter:  gfurnish     |       Owner:  gfurnish
     Type:  enhancement  |      Status:  assigned
 Priority:  major        |   Milestone:  sage-4.1
Component:  symbolics    |    Keywords:          
 Reviewer:               |      Author:          
   Merged:               |  
-------------------------+--------------------------------------------------
Changes (by burcin):

  * priority:  critical => major


Comment:

 Replying to [comment:11 gmhossain]:
 > > The testing didn't reveal any failures related to the patch. However,
 I'm also wondering about
 > > this output:
  {{{
  sage: f(x) = heaviside(x)+dirac_delta(x)
  sage: f(1)
  dirac_delta(1) + heaviside(1)
  }}}
 >
 > It seems, you have hit a bug in new symbolics. The similar non-
 evaluation
 > of symbolic function is happening even with other functions such as sin,
 cos.
 > I posted this issue here
 >
 > http://groups.google.com/group/sage-
 devel/browse_thread/thread/3936d1290ee933a6
 >
 > Burcin wrote that this is a bug and it is to be fixed in the new version
 of pynac.

 This is a different issue than the one you posted on sage-devel.

 In your patch, you are not telling pynac how to evaluate the function you
 define. This is done by defining an `_eval_` method, so if you move the
 contents of your `__call__` function to `_eval_` and remove the last
 `SFunction.__call__` line things should work fine. I agree that this is
 confusing. It's one of the main points I wanted to address while
 refactoring symbolic functions.

 I would also like to see a `.sub()` test added, since this is the easiest
 way to test if the `_eval_` function is defined properly. E.g.,

 {{{
 sage: dirac_delta(x).sub(x=1)
 0
 sage: heaviside(x).sub(x=1)
 1
 }}}

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