Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unwise step use #5

Open
vp1981 opened this issue Feb 8, 2021 · 0 comments
Open

Unwise step use #5

vp1981 opened this issue Feb 8, 2021 · 0 comments

Comments

@vp1981
Copy link
Collaborator

vp1981 commented Feb 8, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant