Page MenuHomeFreeBSD

lib/msun: Added fmaximum_mag and fmaximum_num families. Tests and man
Needs ReviewPublic

Authored by jesuscblazquez_gmail.com on Fri, Apr 3, 2:59 PM.

Details

Reviewers
fuz
Group Reviewers
numerics
Summary

Added support for the f{maximum,minimum}_{mag,num} families, the newest standard for maximums in magnitude and number-preferring. This includes modifying fmax.3, on top of D56230, to recommend the use of fmaximum_num and fminimum_num.

Test Plan

Added tests for the new functions on top of fmaximum_fminimum_test.c. Also added a couple new test cases

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 71965
Build 68848: arc lint + arc unit

Event Timeline

Nice submission! I'll find some time in the next days to work on this one. Please note that kargl thinks fmaximum and fminimum should never raise FE_INVALID, so some slight rework is needed (we do return (a+b) which triggers FE_INVALID if a or b are signalling nans). He has also asked that the build scripts be in alphabetic order. I have prepared patches for both which I will land in the next days, you can then rebase your feature based on that.

In D56236#1286822, @fuz wrote:

Nice submission! I'll find some time in the next days to work on this one. Please note that kargl thinks fmaximum and fminimum should never raise FE_INVALID, so some slight rework is needed (we do return (a+b) which triggers FE_INVALID if a or b are signalling nans). He has also asked that the build scripts be in alphabetic order. I have prepared patches for both which I will land in the next days, you can then rebase your feature based on that.

Great! When I rebase I will also have to fix fmaximum_mag and fminimum_mag to not raise FE_INVALID (I imagine what he said applies to those too). And probably the man pages too. Happy Easter!

Rebased on top of the current main (fmaximum and fminimum). Updated _mag to not throw the invalid exception, adapted tests and man pages to the new changes.