Page MenuHomePhabricator

[libc] Add implementation of hypot.
ClosedPublic

Authored by lntue on Nov 19 2020, 5:02 PM.

Details

Summary

Refactor src/math/hypotf.cpp and test/src/math/hypotf_test.cpp and reuse them for hypot and hypot_test

Diff Detail

Event Timeline

lntue created this revision.Nov 19 2020, 5:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 19 2020, 5:02 PM
lntue requested review of this revision.Nov 19 2020, 5:02 PM
sivachandra added inline comments.Nov 29 2020, 8:25 PM
libc/utils/FPUtil/Hypot.h
121

In other functions, we have not used the _t suffixes. To be consistent, can you follow the same convention here? If you feel strongly about the _t style, you can do a follow up cleanup pass changing everything to follow the _t style.

122

Same here: other places do not have the _t but use UIntType with the template type.

123

Same.

sivachandra accepted this revision.Nov 30 2020, 3:49 PM

Just realized I missed selecting accept.

This revision is now accepted and ready to land.Nov 30 2020, 3:49 PM
lntue marked 2 inline comments as done.Dec 3 2020, 7:49 AM
lntue added inline comments.
libc/utils/FPUtil/Hypot.h
121

Changed to UIntType

lntue updated this revision to Diff 309264.Dec 3 2020, 8:04 AM

Change UInt_t to UIntType.

This revision was landed with ongoing or failed builds.Dec 3 2020, 8:09 AM
This revision was automatically updated to reflect the committed changes.