menios icon indicating copy to clipboard operation
menios copied to clipboard

Implement extended math library functions

Open pbalduino opened this issue 3 months ago • 0 comments

Goal

Complete math library with transcendental functions, long double support, and additional mathematical operations.

Context

Current math library only has fabs* and basic operations. Missing many standard functions.

Definition of Done

  • [ ] Trigonometric: sin, cos, tan, asin, acos, atan, atan2
  • [ ] Hyperbolic: sinh, cosh, tanh, asinh, acosh, atanh
  • [ ] Exponential/logarithmic: exp, log, log10, log2, exp2, expm1, log1p
  • [ ] Power: pow, sqrt, cbrt, hypot
  • [ ] Rounding: ceil, floor, trunc, round, lround, llround, rint
  • [ ] Remainder: fmod, remainder, remquo
  • [ ] Float manipulation: scalbn, logb, nextafter, copysign
  • [ ] Special functions: erf, erfc, tgamma, lgamma
  • [ ] Long double variants for all functions
  • [ ] Proper errno/exception handling

Dependencies

Required

  • #193 - Minimal libc ✅
  • #310 - Basic math library (fabs) ✅
  • #338 - ldexp/frexp/modf ✅ (after completion)

Priority

Medium

Estimated Time

12-16 weeks part-time

Notes

Consider using existing implementation (musl, fdlibm, openlibm)

pbalduino avatar Oct 21 '25 14:10 pbalduino