https://devblogs.microsoft.com/oldnewthing/20220207-00/?p=106223
https://ai.googleblog.com/2006/06/extra-extra-read-all-about-it-nearly.html
https://en.cppreference.com/w/cpp/numeric/midpoint
https://www.youtube.com/watch?v=sBtAGxBh-XI
Types for std::midpoint
- integral
5 of them:
signed char, short int, int, long int, long long int https://en.cppreference.com/w/cpp/language/types
signed overflow is UB; unsigned overflow is defined to wrap around.
signed converted to unsigned is always safe.
every signed integral type has a corresponding unsigned integral type and its name is std::make_unsigned_t<T> - pointer
- floating point
Denormalized numbers, INF, and NaN
"at most one inexact operation"
No, don't do this:
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.