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

[BUG] FittingCurve() could just use log2() now? #1820

Closed
enh-google opened this issue Jul 23, 2024 · 0 comments · Fixed by #1822
Closed

[BUG] FittingCurve() could just use log2() now? #1820

enh-google opened this issue Jul 23, 2024 · 0 comments · Fixed by #1822

Comments

@enh-google
Copy link
Contributor

the NDK removed gnustl in 2017, so this can probably just be replaced with std::log2() now?

    case oLogN:
      /* Note: can't use log2 because Android's GNU STL lacks it */
      return [](IterationCount n) {
        return kLog2E * std::log(static_cast<double>(n));
      };
    case oNLogN:
      /* Note: can't use log2 because Android's GNU STL lacks it */
      return [](IterationCount n) {
        return kLog2E * static_cast<double>(n) *
               std::log(static_cast<double>(n));
      };

(as the Android libc maintainer, i can tell you that the underlying libm log2() has been present since API level 18, which is older than the lowest API level still supported by the NDK [which is 21].)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants