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

Implement missing libm functions #226

Open
9 tasks
klange opened this issue Dec 7, 2021 · 0 comments
Open
9 tasks

Implement missing libm functions #226

klange opened this issue Dec 7, 2021 · 0 comments

Comments

@klange
Copy link
Owner

klange commented Dec 7, 2021

The following functions have stub implementations in our libc's integrated libm component:

  • acos, asin, acosh, asinh, atanh
  • log, log10, log2, log1p,
  • expm1
  • trunc
  • erf, erfc
  • gamma, lgamma, tgamma
  • remainder
  • copysign
  • ldexp

These functions are provided to resolve compilation and linking issues in third-party packages, and with dynamic linking their availability as stubs allows them to be implemented without recompiling those packages in the future. Some of the stubs have partial implementations that are known to be incorrect or inaccurate, while others return a hardcoded 0.0.

Action items:

  • Study the implementations in musl and newlib to understand the common approaches to their implementation.
  • Examine the x86-64 architecture manuals to see what can be implemented via x87/SSE instructions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant