-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Add Lerp to IFloatingPointIeee754 #81186
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
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-system-numerics Issue DetailsThis resolves #80044
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Anything notably tricky that could use a triple check?
Not really, this is a really straightforward API with a trivial implementation. The biggest "gotcha" is ensuring that it is implemented as The two algorithms are mathematically "equivalent" (assuming amount is between 0 and 1, inclusive). However, they produce different results for various edge cases when considering floating-point values and only the former is guaranteed to correctly return |
The floating-point-specific behavior for this functionality is not specified in the IEEE spec, correct? Given that, I assume we are just following common sense and industry standards when deciding how these edge cases are handled? |
Correct |
This resolves #80044