Files
serenity/AK
Nico Weber a826321e87 AK: Replace asin() implementation with a lolremez-based one
Before:

float:

    % ./bench-float-exhaustive -f acosf -f asinf
    acosf  max ULP: 1267.00  mean ULP: 0.039223  CR: 96.1%  FR: 100.0%
           AK: 218.9M/s  ref: 211.2M/s
    asinf  max ULP: 8.00     mean ULP: 0.010256  CR: 99.1%  FR:  99.9%
           AK: 224.3M/s  ref: 259.1M/s

double:

    % ./ak-math-bench --format=wide -f acos -f asin
    Function     Max ULP       Mean ULP   % CR   % FR  Accuracy  Ops/sec
    --------------------------------------------------------------------
    acos()  184318822.00   2465877.8443  58.7%  82.7%       0.0    91.4M
    asin()  390846002.00  11969221.1695  51.3%  83.0%       0.0   113.6M

After:

float:

    % ./bench-float-exhaustive -f asinf -f acosf
    acosf  max ULP: 1267.00  mean ULP: 0.038492  CR: 96.2%  FR: 100.0%
           AK: 393.7M/s  ref: 211.2M/s  (2.3s)
    asinf  max ULP: 2.00     mean ULP: 0.002522  CR: 99.8%  FR: 100.0%
           AK: 432.0M/s  ref: 259.1M/s

double:

    % ./ak-math-bench -f acos -f asin
    Function     Max ULP    Mean ULP    % CR    % FR  Accuracy   Ops/sec
    --------------------------------------------------------------------
    acos()   25216051.00  20936.4458   70.3%   98.7%       0.0     88.9M
    asin()          1.00      0.0791   92.1%  100.0%      92.7    108.0M

With this, asin() is somewhat decent in accuracy, and the float version
is even pretty fast.

For reference, the double version of asin with macOS system libm:

    asin()          1.00      0.0318   96.8%  100.0%      96.9    225.6M

That is about twice as accurate and about twice as fast as ours.
2026-06-21 17:52:25 -04:00
..
2025-09-23 10:34:28 -04:00
2023-03-09 21:43:54 +01:00
2023-03-09 21:43:54 +01:00
2025-10-10 00:02:50 +02:00
2026-02-22 01:33:56 +01:00
2024-06-13 17:40:24 +02:00
2025-10-10 00:02:50 +02:00
2026-06-21 15:26:06 -04:00
2025-10-10 00:02:50 +02:00
2022-12-03 23:52:23 +00:00
2024-01-21 16:16:15 -07:00
2024-06-19 15:45:02 +02:00
2026-04-06 15:44:56 +02:00
2025-10-10 00:02:50 +02:00
2024-04-26 23:46:23 -06:00
2026-04-06 15:44:56 +02:00
2025-08-31 14:04:15 -04:00
2024-02-11 18:53:00 +01:00
2025-04-06 19:21:49 -04:00