-
Notifications
You must be signed in to change notification settings - Fork 1
Unwise step use #5
Copy link
Copy link
Open
Description
Program uses three parameters: the interval edges (named as start, stop) and interval subdivision parameter (step) but this last parameter is misleading. One could assume that they could go from start to stop exactly by steps but it is not the case, consider the following input: start=0.1, stop=0.2, step=9e-3.
The step parameter could be considered as a "basis" for "calculations" step, for example, as following
STEPS = int((stop-start)/step)
real_step = (stop-start)/(STEPS+1)
In that case real_step will be close to step but less than it and always gives integer number of steps to come from start to stop.
P.S. The name stop for end of integration interval is a bit unfortunate, it is more likely to be named as end than current one.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels