4 ms·
I have the impression that creating monotonic floating point function is particularly hard. At least I know that std::lerp is designed to be monotonic in its t
by leni536 2mo ago
I have the impression that creating monotonic floating point function is particularly hard. At least I know that std::lerp is designed to be monotonic in its t parameter (not even in a or b) and its implementation has a number of branches. Although it has other guarantees as well, so I don't know how much of the implementation complexity can be assigned to the monotonicity requirement.
- adrian_b 2mo agoIn the past there were a lot of standard libraries that computed the transcendental functions with big errors. Now there are several libraries that are guaranteed to produce correctly rounded results for any FP64 arguments. However, the correct libraries are somewhat slower than the libraries that provide correct results for most, but not for all input arguments.