#7560: len(t_span) > 2 case creates len(t_span) -  1 solutions
-------------------------+--------------------------------------------------
   Reporter:  adavid     |       Owner:  jkantor                      
       Type:  defect     |      Status:  needs_review                 
   Priority:  minor      |   Milestone:  sage-4.6                     
  Component:  numerical  |    Keywords:  ode_solver, ode_solve, t_span
     Author:             |    Upstream:  N/A                          
   Reviewer:             |      Merged:                               
Work_issues:             |  
-------------------------+--------------------------------------------------
Changes (by medlock):

  * keywords:  t_span => ode_solver, ode_solve, t_span
  * status:  new => needs_review


Comment:

 There are two separate issues here, one of which is clearly a bug:

 1. There's an off-by-one in the code for handling the case where t_span
 specifies all the time points for the solution (len(t_span) > 2).  I put
 together a patch for this above.  The upper limit of the loop was changed
 from n-1 to n and the setting of t_end was moved to the beginning of the
 loop.  I also changed t_span to self.t_span in two spots.

 2. num_points specifies the number of points *after* the initial point, so
 there are num_points + 1 total.  This is not clear one way or the other.
 I tend to like the current version, so that, e.g. t_span = [0, 1],
 num_points = 10, gives points at 0, 0.1, 0.2, ..., 0.9, 1 instead of 0,
 0.11111, 0.22222, ..., 0.88888, 1.

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