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

Smoothstep implementation is wrong #15

Closed
nsmith- opened this issue Jan 6, 2021 · 0 comments · Fixed by #16
Closed

Smoothstep implementation is wrong #15

nsmith- opened this issue Jan 6, 2021 · 0 comments · Fixed by #16
Assignees

Comments

@nsmith-
Copy link
Owner

nsmith- commented Jan 6, 2021

From Thiago, the formula at

formula = "(((0.1875*@0*@0 - 0.625)*@0*@0 + 0.9375)*@0 + 0.5)*TMath::Sign(1, 1+@0)*TMath::Sign(1, 1-@0) + 1 - TMath::Sign(1, 1-@0)"
doesn't behave as it should, blowing up at large values.
I think (((0.1875*x*x - 0.625)*x*x + 0.9375)*x + 0.5)*(x > -1)*(x < 1) + 1*(x >= 1) is what it should be.

@nsmith- nsmith- self-assigned this Jan 6, 2021
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

Successfully merging a pull request may close this issue.

1 participant