8000 MAINT: Simplify npymath by mattip · Pull Request #22090 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: Simplify npymath #22090

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

Merged
merged 16 commits into from
Aug 23, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
frexp is now mandatory
  • Loading branch information
mattip committed Aug 21, 2022
commit 37b2cf17cbf50122283f9737e4419a79fb32d6fb
5 changes: 1 addition & 4 deletions numpy/core/src/npymath/npy_math_internal.h.src
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ NPY_INPLACE double npy_log2(double x)
{
#ifdef HAVE_LOG2
return log2(x);
#elif defined(HAVE_FREXP)
#else
if (!npy_isfinite(x) || x <= 0.) {
/* special value result */
return npy_log(x);
Expand All @@ -123,9 +123,6 @@ NPY_INPLACE double npy_log2(double x)
return log(m) / log(2.0) + e;
}
}
#else
/* does not provide int(log(2**i)) == i */
return NPY_LOG2E * npy_log(x);
#endif
}

Expand Down
0