Skip to content

Unwise step use #5

@vp1981

Description

@vp1981

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions