History log of /llvm-project/libc/src/math/generic/expf.cpp (Results 1 – 22 of 22)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2
# 46944b0c 05-Oct-2024 Job Henandez Lara <jobhdezlara93@gmail.com>

[libc] remove errno.h includes (#110934)


Revision tags: llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# 5ff3ff33 12-Jul-2024 Petr Hosek <phosek@google.com>

[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)

This is a part of #97655.


# ce9035f5 12-Jul-2024 Mehdi Amini <joker.eph@gmail.com>

Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration" (#98593)

Reverts llvm/llvm-project#98075

bots are broken


# 3f30effe 11-Jul-2024 Petr Hosek <phosek@google.com>

[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)

This is a part of #97655.


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init
# 2856db0d 23-Jan-2024 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Remove `FPBits` cast operator (#79142)

The semantics for casting can range from "bitcast" (same representation)
to "different representation", to "type promotion". Here we remove the
c

[libc][NFC] Remove `FPBits` cast operator (#79142)

The semantics for casting can range from "bitcast" (same representation)
to "different representation", to "type promotion". Here we remove the
cast operator and force usage of `get_val` as the only function to get
the floating point value, making the intent clearer and more consistent.

show more ...


# 6b02d2f8 23-Jan-2024 Guillaume Chatelet <gchatelet@google.com>

[reland][libc] Remove unnecessary `FPBits` functions and properties (#79128)

- reland #79113
- Fix aarch64 RISC-V build


# b524eed9 23-Jan-2024 Guillaume Chatelet <gchatelet@google.com>

Revert "[libc] Remove unnecessary `FPBits` functions and properties" (#79118)

Reverts llvm/llvm-project#79113
It broke aarch64 build bot machines.


# 3bc86bf3 23-Jan-2024 Guillaume Chatelet <gchatelet@google.com>

[libc] Remove unnecessary `FPBits` functions and properties (#79113)

This patch reduces the surface of `FPBits`.


# 11ec512f 18-Jan-2024 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Introduce a Sign type for FPBits (#78500)

Another patch is needed to cover `DyadicFloat` and `NormalFloat`
constructors.


# 1b4a0794 19-Dec-2023 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Use FPBits builders instead of custom constructs (#75942)


# 7b387d27 11-Dec-2023 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Fix mixed up biased/unbiased exponent (#75037)

According to [wikipedia](https://en.wikipedia.org/wiki/Exponent_bias)
the "biased exponent" is the encoded form that is always positive
w

[libc][NFC] Fix mixed up biased/unbiased exponent (#75037)

According to [wikipedia](https://en.wikipedia.org/wiki/Exponent_bias)
the "biased exponent" is the encoded form that is always positive
whereas the unbiased form is the actual "real" exponent that can be
positive or negative.
`FPBits` seems to be using `unbiased_exponent` to describe the encoded
form (unsigned). This patch simply use `biased` instead of `unbiased`.

show more ...


Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2
# b6bc9d72 26-Sep-2023 Guillaume Chatelet <gchatelet@google.com>

[libc] Mass replace enclosing namespace (#67032)

This is step 4 of
https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079


Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6
# a9824312 06-Jun-2023 Tue Ly <lntue@google.com>

[libc] Add platform independent floating point rounding mode checks.

Many math functions need to check for floating point rounding modes to
return correct values. Currently most of them use the int

[libc] Add platform independent floating point rounding mode checks.

Many math functions need to check for floating point rounding modes to
return correct values. Currently most of them use the internal implementation
of `fegetround`, which is platform-dependent and blocking math functions to be
enabled on platforms with unimplemented `fegetround`. In this change, we add
platform independent rounding mode checks and switching math functions to use
them instead. https://github.com/llvm/llvm-project/issues/63016

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D152280

show more ...


Revision tags: llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3
# 0aa9593c 19-Feb-2023 Tue Ly <lntue@google.com>

[libc][math] Set floating point exceptions for exp*f, sinhf, and coshf.

Set FE_OVERFLOW and FE_UNDERFLOW for expf, exp2f, exp10f, expm1f, sinhf
and coshf.

Reviewed By: sivachandra, renyichen

Diffe

[libc][math] Set floating point exceptions for exp*f, sinhf, and coshf.

Set FE_OVERFLOW and FE_UNDERFLOW for expf, exp2f, exp10f, expm1f, sinhf
and coshf.

Reviewed By: sivachandra, renyichen

Differential Revision: https://reviews.llvm.org/D144340

show more ...


# 737e1cd1 10-Feb-2023 Guillaume Chatelet <gchatelet@google.com>

[libc] Move likely/unlikely to the optimization header


Revision tags: llvmorg-16.0.0-rc2
# 29f8e076 07-Feb-2023 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Move attributes from common to macros folder


Revision tags: llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# 91ee6720 25-Jul-2022 Tue Ly <lntue@google.com>

[libc] Use nearest_integer instructions to improve expf performance.

Use nearest_integer instructions to improve expf performance.

Performance tests with CORE-MATH's perf tool:

Before the patch:
`

[libc] Use nearest_integer instructions to improve expf performance.

Use nearest_integer instructions to improve expf performance.

Performance tests with CORE-MATH's perf tool:

Before the patch:
```
$ ./perf.sh expf
LIBC-location: /home/lnt/experiment/llvm-project/build/projects/libc/lib/libllvmlibc.a
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH reciprocal throughput : 9.860
System LIBC reciprocal throughput : 7.728
LIBC reciprocal throughput : 12.363

$ ./perf.sh expf --latency
LIBC-location: /home/lnt/experiment/llvm-project/build/projects/libc/lib/libllvmlibc.a
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH latency : 42.802
System LIBC latency : 35.941
LIBC latency : 49.808
```

After the patch:
```
$ ./perf.sh expf
LIBC-location: /home/lnt/experiment/llvm/llvm-project/build/projects/libc/lib/libllvmlibc.a
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH reciprocal throughput : 9.441
System LIBC reciprocal throughput : 7.382
LIBC reciprocal throughput : 8.843

$ ./perf.sh expf --latency
LIBC-location: /home/lnt/experiment/llvm/llvm-project/build/projects/libc/lib/libllvmlibc.a
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH latency : 44.192
System LIBC latency : 37.693
LIBC latency : 44.145
```

Reviewed By: zimmermann6

Differential Revision: https://reviews.llvm.org/D130498

show more ...


Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4
# 614567a7 08-May-2022 Tue Ly <lntue.h@gmail.com>

[libc] Automatically add -mfma flag for architectures supporting FMA.

Detect if the architecture supports FMA instructions and if
the targets depend on fma.

Reviewed By: gchatelet

Differential Rev

[libc] Automatically add -mfma flag for architectures supporting FMA.

Detect if the architecture supports FMA instructions and if
the targets depend on fma.

Reviewed By: gchatelet

Differential Revision: https://reviews.llvm.org/D123615

show more ...


Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1
# 6168b422 24-Mar-2022 Tue Ly <lntue@google.com>

[libc] Improve the performance of expf.

Reduce the polynomial's degree from 7 down to 4.

Currently we use a degree-7 minimax polynomial on an interval of length 2^-7
around 0 to compute `expf`. Bas

[libc] Improve the performance of expf.

Reduce the polynomial's degree from 7 down to 4.

Currently we use a degree-7 minimax polynomial on an interval of length 2^-7
around 0 to compute `expf`. Based on the suggestion of @santoshn and the RLIBM
project (https://github.com/rutgers-apl/rlibm-all/blob/main/source/float/exp.c)
and the improvement we made with `exp2f` in https://reviews.llvm.org/D122346,
it is possible to have a good polynomial of degree-4 on a subinterval of length
2^(-7) to approximate e^x.

We did try to either reduce the degree of the polynomial down to 3 or increase
the interval size to 2^(-6), but in both cases the number of exceptional values
exploded. So we settle with using a degree-4 polynomial of the interval of
size 2^(-7) around 0.

Reviewed By: sivachandra, zimmermann6, santoshn

Differential Revision: https://reviews.llvm.org/D122418

show more ...


# 64af346b 14-Mar-2022 Tue Ly <lntue@google.com>

[libc] Implement expm1f function that is correctly rounded for all rounding modes.

Implement expm1f function that is correctly rounded for all rounding modes. This is based on expf implementation.

[libc] Implement expm1f function that is correctly rounded for all rounding modes.

Implement expm1f function that is correctly rounded for all rounding modes. This is based on expf implementation.

From exhaustive testings, using expf implementation, and subtract 1.0 before rounding the final result to single precision
gives correctly rounded results for all |x| > 2^-4 with 1 exception. When |x| < 2^-25, we use x + x^2 (implemented with a
single fma). And for 2^-25 <= |x| <= 2^-4, we use a single degree-8 minimax polynomial generated by Sollya.

Reviewed By: sivachandra, zimmermann6

Differential Revision: https://reviews.llvm.org/D121574

show more ...


Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4
# 38cadd90 11-Mar-2022 Tue Ly <lntue@google.com>

[libc] Implement expf function that is correctly rounded for all rounding modes.

Implement expf function that is correctly rounded for all rounding modes.

Reviewed By: sivachandra, zimmermann6

Dif

[libc] Implement expf function that is correctly rounded for all rounding modes.

Implement expf function that is correctly rounded for all rounding modes.

Reviewed By: sivachandra, zimmermann6

Differential Revision: https://reviews.llvm.org/D121440

show more ...


Revision tags: llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3
# bbb75554 03-Feb-2021 Siva Chandra <sivachandra@google.com>

[libc][NFC] Move generic math implementations to the generic directory.

This expands the pattern suggest in https://reviews.llvm.org/D95850 to all
math functions.