Skip to content
24 changes: 13 additions & 11 deletions HARDWARE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ be the whole string ("The Arm host" below).

| machine | host key and CPU string | vector flags | JVM | lane-ops/ns at 128 / 256 / 512 | control | 512:256 | source |
|---|---|---|---|---|---|---|---|
| Intel Xeon Platinum 8573C | `xeon8573c`, `INTEL(R) XEON(R) PLATINUM 8573C` | full `avx512` set | `UseAVX=3`, `MaxVectorSize=64` | two readings: 34.5-35.7 / 68.8-70.8 / 93.7-96.3 (fifteen files, 3 to 22 November 2026); 41.5 / 82.7 / 113.0 (one file, 3 November) | 1.98 to 2.00 in the files; 2.00 to 2.03 in Varka's runs | 1.36 to 1.37 in the files; 1.34 to 1.36 in Varka's runs | Varka, `VARKA-62.md` 11.9, 4 runs (the control and 512:256 ranges of Varka's runs); the files named under "The 8573C's two readings" below; the string from vecbricks/varka's fork runs 41465323581, 41255932044 and 41241977271 (the owner's fork of apache/spark) |
| Intel Xeon Platinum 8573C | `xeon8573c`, `INTEL(R) XEON(R) PLATINUM 8573C` | full `avx512` set | `UseAVX=3`, `MaxVectorSize=64` | two readings: 34.5-35.7 / 68.8-70.8 / 93.7-96.3 (nineteen files, 3 to 22 November 2026); 41.5 / 82.7 / 113.0 (one file, 3 November) | 1.98 to 2.00 in the files; 2.00 to 2.03 in Varka's runs | 1.36 to 1.37 in the files; 1.34 to 1.36 in Varka's runs | Varka, `VARKA-62.md` 11.9, 4 runs (the control and 512:256 ranges of Varka's runs); the files named under "The 8573C's two readings" below; the string from vecbricks/varka's fork runs 41465323581, 41255932044 and 41241977271 (the owner's fork of apache/spark) |
| Intel Xeon 6973P-C (Granite Rapids) | `xeon6973p`, `Intel(R) Xeon(R) 6973P-C` | full `avx512` set | `UseAVX=3`, `MaxVectorSize=64` | see source | 2.00 to 2.01 | 1.33 to 1.35 | Varka, `VARKA-62.md` 11.9, 2 runs; the string from vfdlibm run 41442062308 |
| AMD EPYC 9V45 (Zen 5) | `epyc9v45`, `AMD EPYC 9V45 96-Core Processor` | full `avx512` set | `UseAVX=3`, `MaxVectorSize=64` | see source | 2.04 | 1.99 | Varka, `VARKA-62.md` 11.9, 1 run; the string from Varka's fork runs 41486339971, 41446843041 and 41329377429 |
| AMD EPYC 7763 (Zen 3) | `epyc7763`, `AMD EPYC 7763 64-Core Processor` | `avx2`, no `avx512` | `UseAVX=2`, `MaxVectorSize=32` | 45.0-46.5 / 90.0-92.6 / 90.0-92.6 | 1.99 to 2.01 | 1.00 | Varka, `VARKA-62.md` 11.9, 8 runs; the lane rates, a range, from 16 Varka fork runs, 31 October to 2 November 2026 (41236071283 to 41460150392); the string from `bench/results/exp-epyc7763-2026-11-02.txt` and `log-epyc7763-2026-11-02.txt`; `exp-epyc7763-2026-11-20.txt` reads 46.2 / 92.2 / 92.5 (control 2.00, 512:256 1.00) in its first run and 46.3 / 92.4 / 92.4 in its second, inside the range |
Expand Down Expand Up @@ -74,18 +74,20 @@ it, none is claimed, and whether the ports' arms should differ on Arm waits for

### The 8573C's two readings

Fifteen of the sixteen files of this host read 34.5 to 35.7 lane-ops/ns at 128 bits, 68.8 to 70.8
at 256 and 93.7 to 96.3 at 512: `exp-onediv-xeon8573c-2026-11-03.txt` (34.7 / 68.8 / 94.1, control
Nineteen of the twenty files of this host read 34.5 to 35.7 lane-ops/ns at 128 bits, 68.8 to 70.8 at
256 and 93.7 to 96.3 at 512: `exp-onediv-xeon8573c-2026-11-03.txt` (34.7 / 68.8 / 94.1, control
1.98, 512:256 1.37), `expm1-xeon8573c-2026-11-04.txt` (34.8 / 69.2 / 94.1, 1.99, 1.36), the nine
files of 21 November, from two runs: `exp-xeon8573c-2026-11-21.txt` and its five siblings (34.5 /
69.1 / 93.7, 2.00, 1.36) and `sinh-`, `cosh-` and `cosh-kinds-xeon8573c-2026-11-21.txt` (34.9 /
69.9 / 94.8, 2.00, 1.36), and the four of 22 November, `asin-xeon8573c-2026-11-22.txt` and its
three siblings (35.7 / 70.8 / 96.3, 1.98, 1.36). `log1p-xeon8573c-2026-11-03.txt`, of the same
day as the pair, reads 41.5 / 82.7 / 113.0 (1.99, 1.37), and its scalar `StrictMath` loop reads
7,358 ns on common data where the `log1p` file of 21 November reads 8,846. Each file's header says
which it ran on; no cause for the difference is claimed here. The 25 nightly draws of this CPU in
"What the pool gives" below read 34.5 to 41.7, 68.9 to 83.2 and 93.6 to 113.0 at the three
widths.
69.1 / 93.7, 2.00, 1.36) and `sinh-`, `cosh-` and `cosh-kinds-xeon8573c-2026-11-21.txt` (34.9 / 69.9
/ 94.8, 2.00, 1.36), and the eight of 22 November, from two runs: `asin-xeon8573c-2026-11-22.txt`
and its three siblings (35.7 / 70.8 / 96.3, 1.98, 1.36), and run 45082534869's `expm1-`, `log-`,
`log10-` and `log1p-xeon8573c-2026-11-22.txt` with the second run in
`atan2-xeon8573c-2026-11-22.txt` (34.6 / 69.1 / 93.8, 2.00, 1.36). `log1p-xeon8573c-2026-11-03.txt`,
of the same day as the pair, reads 41.5 / 82.7 / 113.0 (1.99, 1.37), and its scalar `StrictMath`
loop reads 7,358 ns on common data where the `log1p` file of 21 November reads 8,846. Each file's
header says which it ran on; no cause for the difference is claimed here. The 25 nightly draws of
this CPU in "What the pool gives" below read 34.5 to 41.7, 68.9 to 83.2 and 93.6 to 113.0 at the
three widths.

The two Xeons are the AVX-512 hosts results wait for and are read first; their 512:256 of about
1.35 means a 512-bit arm can win there, but not by the factor of two its lane count suggests.
Expand Down
30 changes: 19 additions & 11 deletions PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ own logarithm and exponential and calls only `sqrt`, `fabs` and `scalbn`. `sinh`
(`VFdlibm.sinh`, from `e_sinh.c`, computing through `expm1`'s common path below 22 and finishing
the rest per lane), and so is `cosh` (`VFdlibm.cosh`, from `e_cosh.c`, through `exp`'s common path
and expm1's `k == 0` lines, with two arms for its small range: the default arm is the slice arm,
provisionally: the host files of 21 November read the finish arm lower on every `CoshBenchmark`
row, by ratios near 1.3x or inside it, and decide neither). `asin` is done
provisionally, until a host run decides, section 5). `asin` is done
too (`VFdlibm.asin`, from `e_asin.c`, with `sqrt` as the Vector API's `SQRT`, one arm, and the
lanes of `|x| >= 1` finished per lane), and so is `atan` (`VFdlibm.atan`, from `s_atan.c`, five
ranges through one division on blended operands, the lanes from `2^66` up finished per lane), and
Expand Down Expand Up @@ -155,15 +154,24 @@ five are a later, optional set; the large-argument reduction of the trigonometri
out of both rules; a later run's `*Max` rows time today's finish. On the other rows no function
needs rule 2 yet, so `VFdlibm` runs one arm at every species. Every default stays provisional
until a host run revises it. Meanwhile `VFdlibm` calls the finish arm of `exp`, `log` and `log10`;
the guarded arm of `expm1` and `log1p`, by the owner's deferral of rule 1 until the 8573C's second
run (issue #30, 21 November); the slice arm of `cosh`, provisionally, as the rule's exception
(`bench/results/cosh-xeon8573c-2026-11-21.txt` and `cosh-epyc7763-2026-11-21.txt` read the finish
arm lower on every row by ratios near 1.3x or inside it, and give no direction); and the guarded
arm of `atan2`, which has no finish arm, so rule 1 does not pick between its two ([issue #30's
corrected comment](https://github.com/vecbricks/vfdlibm/issues/30#issuecomment-7085437272)).
Neither host's file gives the arms a direction (`atan2-xeon8573c-2026-11-22.txt`, inside 1.3x;
`atan2-epyc7763-2026-11-22.txt`, near 1.3x or inside it, one run), so guarded stays the default at
every species by the owner's decision of 22 November until a re-run of each host.
the guarded arm of `expm1` and `log1p`, by the owner's deferral of rule 1 (issue #30, 21 November)
until a second run, on the 8573C, of the code the 22 November files time (those files are the
first run of it); the slice arm of `cosh`, provisionally, as the rule's exception, whose arm a
host run decides ([issue #30's
comment](https://github.com/vecbricks/vfdlibm/issues/30#issuecomment-7091848602); its readings are
under the list); and the guarded arm of `atan2`, which has no finish arm, so rule 1 does not pick
between its two ([issue #30's corrected
comment](https://github.com/vecbricks/vfdlibm/issues/30#issuecomment-7085437272)). Each host has
timed atan2's arms in a run and a re-run (`atan2-xeon8573c-2026-11-22.txt`,
`atan2-epyc7763-2026-11-22.txt`), and neither file gives them a direction, so guarded stays the
default at every species by the owner's decision of 22 November.
cosh's readings, by minimums: on `CoshBenchmark` the EPYC 7763's two runs agree, outside 1.3x, on
the finish arm lower on common data (slice over finish 1.33 to 1.37), a direction, and give no
direction on mixed data (`bench/results/cosh-epyc7763-2026-11-21.txt`); on `CoshKindsBench` the
finish arm reads lower outside 1.3x with no small lane (1.46 to 1.70 on both hosts), lower inside
1.3x at 3.5% of small lanes, and the slice arm lower inside 1.3x at 17%
(`cosh-kinds-epyc7763-2026-11-21.txt`, `cosh-kinds-xeon8573c-2026-11-21.txt`). The Xeon 8573C has
one `CoshBenchmark` run (`cosh-xeon8573c-2026-11-21.txt`); a second run decides.

## 6. Rules

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,15 @@ fdlibm's own sequence of operations, lane by lane. That is this library.
hosts disagree the files say so. The rules are set (issue #30): a tie within 1.3x on every host
that has a file goes to the finish arm, except for `cosh`, whose arm a host run decides, and where
hosts disagree each species keeps its own arm (no function needs that yet). `expm1` and `log1p`
stay on their guarded arm by the owner's deferral of the rule until the 8573C's second run. The
stay on their guarded arm by the owner's deferral of the rule until a second run, on the 8573C, of
the code its files of 22 November time. The
`*Max` rows of the host files of 3 to 21 November for `exp`, `expm1`, `log`, `log10` and `log1p`
(`exp-onediv-xeon8573c-2026-11-03.txt` and those of 20 and 21 November;
`log1p-xeon8573c-2026-11-03.txt` and `expm1-xeon8573c-2026-11-04.txt` have no `*Max` row) time the
finish that boxed before issue #37 and are left out of the rules. `atan2` has no finish arm, so
the rule does not pick between its two; neither host's file gives them a direction, and its
guarded arm stays the default at every species by the owner's decision until a re-run of each
host. Every default stays provisional until a host run revises it; `PLAN.md` section 5 gives each
the rule does not pick between its two; neither host's file gives them a direction after a run and
a re-run each, and its guarded arm stays the default at every species by the owner's decision.
Every default stays provisional until a host run revises it; `PLAN.md` section 5 gives each
function's case. The laptop's numbers do not agree at every width.

## Testing
Expand Down
39 changes: 18 additions & 21 deletions SKILLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1108,18 +1108,17 @@ blend and 10 to 23 instructions. At 128 bits the bodies are 8 to 16 times longer
only on `|x| < 0.5*ln2`, so their cost follows the share of that range, which is 3.5% in
Varka's baseline benchmark and 17% in Spark's unit tests (issue #32): at 8 lanes a vector
holds one in 27% and 82% of the cases. `CoshKindsBench` has those two shares, and
`CoshBenchmark`'s common data 0.6% of them. A laptop run under load read no direction and was
not kept. Each host has since run both classes once
(`bench/results/cosh-xeon8573c-2026-11-21.txt`, `cosh-epyc7763-2026-11-21.txt`,
`cosh-kinds-xeon8573c-2026-11-21.txt` and `cosh-kinds-epyc7763-2026-11-21.txt`), and no file
decides the arm: on `CoshBenchmark` the finish arm reads lower on every row, slice over finish
1.24 to 1.35 on the Xeon 8573C and 1.29 to 1.35 on the EPYC 7763, ratios near 1.3x or inside
it that give no direction until a re-run; on `CoshKindsBench` the finish arm reads lower by
more than 1.3x only on data with no small lane, and the arms read within 1.3x of each other,
with no direction, at 3.5% and 17% of small lanes, Varka's and Spark's shares. cosh is the
named exception to issue #30's tie rule (its per-lane set is not rare, so a host run decides),
so the default is still the plan's baseline design, not a measurement, and stays provisional
until a host run decides it.
`CoshBenchmark`'s common data 0.6% of them. A laptop run under load read no direction and was not
kept. The slice arm stays the default, provisionally, as the named exception to issue #30's tie
rule (its per-lane set is not rare, so a host run decides; [issue #30's
comment](https://github.com/vecbricks/vfdlibm/issues/30#issuecomment-7091848602)). The readings,
by minimums: on `CoshBenchmark` the EPYC 7763's two runs agree, outside 1.3x, on the finish arm
lower on common data (slice over finish 1.33 to 1.37), a direction, and give no direction on mixed
data (`bench/results/cosh-epyc7763-2026-11-21.txt`); on `CoshKindsBench` the finish arm reads
lower outside 1.3x with no small lane (1.46 to 1.70 on both hosts), lower inside 1.3x at 3.5% of
small lanes, and the slice arm lower inside 1.3x at 17% (`cosh-kinds-epyc7763-2026-11-21.txt`,
`cosh-kinds-xeon8573c-2026-11-21.txt`). The Xeon 8573C has one `CoshBenchmark` run
(`cosh-xeon8573c-2026-11-21.txt`); a second run decides.
- **Which exp faults reach cosh.** `exp.dropCorrection` and `exp.constantOffByOneUlp`, which
change `expCore`'s lanes of `|x| >= 0.5 ln2`. `exp.thresholdMoved` moves the subnormal
scale-back, which `expCore` leaves out, and `exp.dropKForcing` the lanes of the word of 0.5
Expand Down Expand Up @@ -1269,15 +1268,13 @@ blend and 10 to 23 instructions. At 128 bits the bodies are 8 to 16 times longer
`bench/alloc-check.py` passes on the `Atan2Benchmark` rows (`blended` and `guarded`, at 256 bits,
the preferred species and `SPECIES_MAX`, common and mixed data) at this laptop's flags and as an
AVX2 host, and CI runs it. Those local readings are not committed, so no figure of them is
quoted. Each host has timed both arms once (`bench/results/atan2-xeon8573c-2026-11-22.txt` and
`atan2-epyc7763-2026-11-22.txt`): on the Xeon they read within 1.3x of each other at every
width, and on the EPYC 7763 near 1.3x or inside it, so neither file gives them a direction.
atan2 has no finish arm (both arms compute the special lanes in the vector; blended runs their
blends in every vector, guarded behind a test), so rule 1 of issue #30 does not pick between
them ([the issue's corrected
comment](https://github.com/vecbricks/vfdlibm/issues/30#issuecomment-7085437272)).
So guarded stays the default at every species by the owner's decision of 22 November until a
re-run of each host.
quoted. Each host has timed both arms in a run and a re-run
(`bench/results/atan2-xeon8573c-2026-11-22.txt` and `atan2-epyc7763-2026-11-22.txt`), and neither
file gives them a direction. atan2 has no finish arm (both arms compute the special lanes in the
vector; blended runs their blends in every vector, guarded behind a test), so rule 1 of issue #30
does not pick between them ([the issue's corrected
comment](https://github.com/vecbricks/vfdlibm/issues/30#issuecomment-7085437272)). So guarded
stays the default at every species by the owner's decision of 22 November.
- **A lane the core must not see.** A NaN, an infinity or a huge `t` in a lane the special blends
overwrite would send the vector to atan's per-lane finish. The mask `t < 2^66` keeps them out
(a NaN compares false), and a vector with no special lane never reaches the finish.
Expand Down
4 changes: 2 additions & 2 deletions src/jmh/java/io/github/vecbricks/vfdlibm/Atan2Benchmark.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
* at 256 bits, at the host's preferred species and at {@code SPECIES_MAX}. 128 bits is left out:
* on x86 C2 lowers no mask at two 64-bit lanes, so every 128-bit arm boxes (SKILLS.md). {@code
* bench/alloc-check.py} reads it for what the bodies allocate, and
* bench/results/atan2-xeon8573c-2026-11-22.txt and atan2-epyc7763-2026-11-22.txt time it, one
* run on each host, which gives the two arms no direction.
* bench/results/atan2-xeon8573c-2026-11-22.txt and atan2-epyc7763-2026-11-22.txt time it, a run and
* a re-run on each host, which give the two arms no direction.
*
* <p>{@code inputs} picks the data: {@code common} draws {@code y} and {@code x} from {@code
* (-4, 4)}, where no lane is special (NaN, zero, infinite), none has {@code x = 1.0} and none
Expand Down
5 changes: 2 additions & 3 deletions src/jmh/java/io/github/vecbricks/vfdlibm/CoshBenchmark.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@
* DoubleVector.SPECIES_MAX}, where the finish writes out its first eight lanes with constant
* indices and a loop takes any past eight; the rows read under 0.1 B/op in the laptop reading of
* bench/results/max-finish-alloc-free-laptop-2026-11-21.txt (allocation only, no timing). No
* file reads the finish they replaced. bench/results/cosh-xeon8573c-2026-11-21.txt and
* cosh-epyc7763-2026-11-21.txt read these rows, one run on each host, and give the two arms no
* direction.
* file reads the finish they replaced. bench/results/cosh-xeon8573c-2026-11-21.txt (one run) and
* cosh-epyc7763-2026-11-21.txt (a run and a re-run) read these rows; no file decides the arm.
*/
@State(Scope.Thread)
@BenchmarkMode(Mode.AverageTime)
Expand Down
4 changes: 2 additions & 2 deletions src/jmh/java/io/github/vecbricks/vfdlibm/CoshKindsBench.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
* (AGENTS.md); by hand that is {@code -f 2 -wi 3 -w 2s -i 5 -r 2s -prof gc -jvmArgsAppend
* -XX:CompileCommand=inline,io.github.vecbricks.vfdlibm.*::*}.
*
* <p>bench/results/cosh-kinds-xeon8573c-2026-11-21.txt and cosh-kinds-epyc7763-2026-11-21.txt
* read these rows, one run on each host, and decide no arm.
* <p>bench/results/cosh-kinds-xeon8573c-2026-11-21.txt (one run) and
* cosh-kinds-epyc7763-2026-11-21.txt (a run and a re-run) read these rows, and decide no arm.
*/
@State(Scope.Thread)
@BenchmarkMode(Mode.AverageTime)
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/github/vecbricks/vfdlibm/Atan2.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
* {@code guarded} only in a vector with a live special lane, which is the one {@code VFdlibm}
* calls, at every species. atan2 has no finish arm, so rule 1 of issue #30 (a tie goes to the
* finish arm) does not pick between the two (the issue's corrected comment,
* https://github.com/vecbricks/vfdlibm/issues/30#issuecomment-7085437272). Neither host's file
* gives the arms a direction ({@code bench/results/atan2-xeon8573c-2026-11-22.txt}, inside 1.3x;
* {@code atan2-epyc7763-2026-11-22.txt}, near 1.3x or inside it, one run), so guarded stays the
* default at every species by the owner's decision of 22 November until a re-run of each host.
* https://github.com/vecbricks/vfdlibm/issues/30#issuecomment-7085437272). Each host has timed both
* arms in a run and a re-run ({@code bench/results/atan2-xeon8573c-2026-11-22.txt} and {@code
* atan2-epyc7763-2026-11-22.txt}), and neither file gives them a direction, so guarded stays the
* default at every species by the owner's decision of 22 November.
*/
final class Atan2 {

Expand Down
Loading