Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant