Recent

Author Topic: Faster asin() Was Hiding In Plain Sight  (Read 591 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2697
    • UVviewsoft
Faster asin() Was Hiding In Plain Sight
« on: March 12, 2026, 01:20:23 pm »
Blog post with faster 'formulas' for ArcSin.
https://16bpp.net/blog/post/faster-asin-was-hiding-in-plain-sight/

Do we have slower/worse algo in FPC?

MathMan

  • Sr. Member
  • ****
  • Posts: 499
Re: Faster asin() Was Hiding In Plain Sight
« Reply #1 on: March 12, 2026, 01:58:30 pm »
This is a bit comparing apples & oranges. The article refers to an improved approximation via Pade-Approx. However there is still a significant error term, even in the ranges that the author defines as "good enough".

The asin() function in the FPC RTL is geared towards precision - different target entirely. If you would want to replace this (or other elementary functions in the RTL) then you might take a look at the CORE-MATH project here

  https://core-math.gitlabpages.inria.fr/

The implementations are geared towards precision (correct rounding even) and throughput. They are probably better than what is available in the RTL currently ...

Cheers,
MathMan

 

TinyPortal © 2005-2018