Page MenuHomeFreeBSD

lib/msun: Added fmaximum and fminimum family. Tests and man page
ClosedPublic

Authored by jesuscblazquez_gmail.com on Thu, Mar 12, 10:23 PM.
Referenced Files
Unknown Object (File)
Tue, Mar 31, 12:50 PM
Unknown Object (File)
Thu, Mar 26, 8:35 AM
Unknown Object (File)
Wed, Mar 25, 10:29 PM
Unknown Object (File)
Sun, Mar 22, 10:58 AM
Unknown Object (File)
Fri, Mar 20, 12:28 AM
Unknown Object (File)
Fri, Mar 20, 12:28 AM
Unknown Object (File)
Thu, Mar 19, 12:50 PM
Unknown Object (File)
Thu, Mar 19, 12:36 PM
Subscribers

Details

Summary

Starting from the existing fmax{,f,l} functions I've added the fmaximum family, which handles NaN according to the newest standard (propagating it).

This commit is a PoC for GSoC.

Test Plan

I've used fmaxmin_test.c as a base, adapting it to the new functions.

Diff Detail

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

Event Timeline

Looks pretty reasonable, though I'll let Steve Kargl have the last word.
Needs a man page.

lib/msun/Symbol.map
320–322

15.0 is already out, CURRENT is at 16.0.

lib/msun/src/s_fmaximum.c
2

We got rid of the /*- convention a while ago.

lib/msun/tests/fmaximum_test.c
60–63 ↗(On Diff #173630)

shouldn't this match your code better?

Do you plan to follow up on this before the start of GSoC?

Sorry for the delay, exam season is rough this year, but once I'm done I will follow up with the fminimum and man pages

jesuscblazquez_gmail.com edited the test plan for this revision. (Show Details)

lib/msun: Added fmaximum and fminimum families. Tests and man page

jesuscblazquez_gmail.com retitled this revision from lib/msun: Added fmaximum family and its tests to lib/msun: Added fmaximum and fminimum family. Tests and man page.Tue, Mar 31, 12:49 PM

Fixed accidentally adding an unrelated commit

This looks pretty good.

I'll add a cross reference to math(3) on commit.

Will test a bit more and then land this patch set.

lib/msun/src/s_fmaximumf.c
34

Clang and gcc don't seem to have these as built ins right now. It might be helpful to add a note on this to the commit message.

lib/msun/tests/fmaximum_fminimum_test.c
3

If you have significantly adapted the code, do not hesitate to add your own copyright below.

This revision is now accepted and ready to land.Tue, Mar 31, 4:39 PM

Two changes will be made before landing this:

  • fminimum* and fmaximum* should never raise FE_INVALID
  • build scripts should be alphabetised

For both changes I have sent a patch to the author to review. Will land afterwards.