-
Notifications
You must be signed in to change notification settings - Fork 3
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
Zero on start X value #1
Comments
Good catch, thanks! I've just pushed a fix and a test that should catch this case :) Tagged as release |
For convenience, here's the link to the release with the fix: https://github.com/sgreben/piecewiselinear/releases/tag/2.0.4 :) |
All works fine. |
You're welcome! Thanks for finding the bug 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
I've tried to run simple example before using in project:
f := piecewiselinear.Function{Y: []float64{100, 105, 120}}
f.X = piecewiselinear.Span(10, 16, len(f.Y))
fmt.Println(f.X)
fmt.Println(f.Y)
fmt.Println(
f.At(10), // f.At(x) evaluates f at x
f.At(11),
f.At(12),
f.At(13),
f.At(14),
f.At(15),
f.At(16),
)
And I've got the output:
[10 13 16]
[100 105 120]
0 101.66666666666667 103.33333333333334 105 110.00000000000001 115 120
Everything is fine except zero on defined X value.
Thank you
The text was updated successfully, but these errors were encountered: