Page MenuHomePhabricator

[libc] Add implementations of ceil[f], floor[f] and trunc[f] from math.h.
ClosedPublic

Authored by sivachandra on May 26 2020, 11:11 PM.

Diff Detail

Event Timeline

sivachandra created this revision.May 26 2020, 11:11 PM

If adding latex docs which explain the theoretical concepts behind the operations would be useful in general for math functions, I can work on that parallely/separately.

Use compiler generated instructions for floating point addition.

Use floating point literals for 1.0 and 0.0 instead of bit patterns.

abrachet accepted this revision.May 30 2020, 12:20 PM

LGTM

libc/utils/FPUtil/FloatOperations.h
47

Maybe &=

This revision is now accepted and ready to land.May 30 2020, 12:20 PM
This revision was automatically updated to reflect the committed changes.
sivachandra marked an inline comment as done.Jun 1 2020, 8:38 AM