Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faster, more accurate log2, log10 #39556

Merged
merged 7 commits into from
Feb 14, 2021
Merged

Conversation

oscardssmith
Copy link
Member

This uses our existing very good log implementation for log2 and log10. This both reduces error, and increases speed for Float32 and Float64. There is no impact on log (other than a pretty minor performance regression for Float64). I think I can solve the regression fairly easily, so I'm pushing it now so it can be reviewed (and I can see if CI passes)

@oscardssmith oscardssmith reopened this Feb 7, 2021
@kshyatt kshyatt added maths Mathematical functions performance Must go faster labels Feb 7, 2021
base/math.jl Outdated Show resolved Hide resolved
base/special/log.jl Outdated Show resolved Hide resolved
@oscardssmith
Copy link
Member Author

Anyone have objections to merging this?

@stevengj stevengj merged commit 2eeef2e into JuliaLang:master Feb 14, 2021
@oscardssmith oscardssmith deleted the better-logb branch February 14, 2021 18:29
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
* faster, more accurate log2, log10

* fix error message for negative numbers

* fix rebase

* Maybe fix doctest for domainerror

* Fix accidental change

* don't use metaprogramming

* fix typo
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
* faster, more accurate log2, log10

* fix error message for negative numbers

* fix rebase

* Maybe fix doctest for domainerror

* Fix accidental change

* don't use metaprogramming

* fix typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maths Mathematical functions performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants