Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Replace numerically more stable log1p and expm1 #1424

Merged
merged 1 commit into from
Feb 8, 2019

Conversation

lgeiger
Copy link
Contributor

@lgeiger lgeiger commented Feb 1, 2019

This PR replaces log(1 + x) with log1p(x) and exp(x) - 1 with expm1(x). These functions are more precise if x is close to zero.

@googlebot googlebot added the cla: yes PR author has signed CLA label Feb 1, 2019
This PR replaces `log(1 + x)` with `log1p(x)` and `exp(x) - 1` with `expm1(x)`. These functions are more precise if x is close to zero.
@afrozenator
Copy link
Contributor

Thanks a lot for these @lgeiger -- they are much appreciated, as always!

@afrozenator afrozenator merged commit c81f56c into tensorflow:master Feb 8, 2019
tensorflow-copybara pushed a commit that referenced this pull request Feb 8, 2019
PiperOrigin-RevId: 233100331
@lgeiger lgeiger deleted the log1p branch February 8, 2019 22:10
kpe pushed a commit to kpe/tensor2tensor that referenced this pull request Mar 2, 2019
This PR replaces `log(1 + x)` with `log1p(x)` and `exp(x) - 1` with `expm1(x)`. These functions are more precise if x is close to zero.
kpe pushed a commit to kpe/tensor2tensor that referenced this pull request Mar 2, 2019
PiperOrigin-RevId: 233100331
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants