Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Changed or Fixed; a change to tests, docs or the build alone does not.
**The promise, while the version is 0.x.** A minor version may break the public API and a patch may
not. Adding a function is a patch. Changing an arm (how a function reaches its result: the blend,
the per-lane finish, the order of a branch) is a patch too, because every arm gives the same bits
(on a two-NaN lane, one of the declared candidates). 0.1.x supports JDK 25 only (`README.md`,
(on a two-NaN lane, one of the declared candidates). 0.2.x supports JDK 25 only (`README.md`,
"Supported JDKs"). What no version may change is the contract: **each lane of each function equals
`StrictMath`'s result on that input, by `Double.doubleToRawLongBits`**, NaN payloads included. One
exception: a lane of a function of two arguments where both arguments are NaN with different bits is
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ two NaNs with different bits in a function of two arguments (`AGENTS.md`, "Relea

## [Unreleased]

## [0.2.0] - 2026-11-22

### Added

- `VFdlibm.sinh`, in the two forms `sinh(x)` and `sinh(x, live)`, over `DoubleVector` lanes of any
Expand Down Expand Up @@ -67,5 +69,6 @@ two NaNs with different bits in a function of two arguments (`AGENTS.md`, "Relea
module `io.github.vecbricks.vfdlibm`. A client needs the incubating Vector API module
(`--add-modules jdk.incubator.vector`) at compile time and at run time.

[Unreleased]: https://github.com/vecbricks/vfdlibm/compare/v0.1.0...HEAD
[Unreleased]: https://github.com/vecbricks/vfdlibm/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/vecbricks/vfdlibm/releases/tag/v0.2.0
[0.1.0]: https://github.com/vecbricks/vfdlibm/releases/tag/v0.1.0
2 changes: 1 addition & 1 deletion PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ five are a later, optional set; the large-argument reduction of the trigonometri
general, so no proof covers them as a rule. A specific use proven equal for every input would
follow the proof rule above like any other different computation. No `Math.*` call inside a
vector body except the per-lane `StrictMath` fallback.
- Java 25 only for 0.1.x, the Vector API module, no preview features. The Vector API is
- Java 25 only for 0.2.x, the Vector API module, no preview features. The Vector API is
incubating and C2's lowering of it moves between JDK releases, so no other JDK is measured,
and bit identity is tested on 25 alone (every workflow pins Zulu 25); there is no CI row
for a newer JDK (the owner's decision of 21 November 2026, closing #38's step 5).
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# vfdlibm

fdlibm on the Java Vector API: math functions over `DoubleVector` lanes whose every lane is
bit-identical to `java.lang.StrictMath`, but for a two-NaN lane of `atan2` (unreleased).
bit-identical to `java.lang.StrictMath`, but for a two-NaN lane of `atan2`.

**Status: 0.x.** `exp`, `expm1`, `log`, `log1p` and `log10` are ported and released:
`io.github.vecbricks:vfdlibm` 0.1.0 is on Maven Central. Functions are added one at a time, as
**Status: 0.x.** `exp`, `expm1`, `log`, `log1p`, `log10`, `sinh`, `cosh`, `asin`, `atan`, `acos`
and `atan2` are ported and released in 0.2.0 (`exp`, `expm1`, `log`, `log1p` and `log10` in
0.1.0), as `io.github.vecbricks:vfdlibm`. Functions are added one at a time, as
[Varka](https://github.com/vecbricks/varka) needs them. A minor version may break the API and a
patch may not; adding a function is a patch. Bit identity with `StrictMath` is the contract, and
no version changes it (`CHANGELOG.md`), and no released function has a two-NaN lane to except.
no version changes it (`CHANGELOG.md`); the one lane it excepts is a lane of two NaNs with
different bits in `atan2`.

## Use

Expand Down Expand Up @@ -119,9 +121,9 @@ mvn -q clean compile org.apache.maven.plugins:maven-dependency-plugin:3.7.0:buil
java --module-path "target/classes:$(cat cp.txt)" -m example/example.Main
```

Each function takes a vector of any species of 128 bits or more. Released in 0.1.0: `exp`,
`expm1`, `log`, `log10` and `log1p`. On `main`, unreleased: `sinh`, `cosh`, `asin`, `atan`, `acos`
and `atan2(y, x)`, which takes two vectors. The system property `vfdlibm.fault` plants a
Each function takes a vector of any species of 128 bits or more. Released in 0.2.0: `exp`,
`expm1`, `log`, `log10`, `log1p`, `sinh`, `cosh`, `asin`, `atan`, `acos` and `atan2(y, x)`, which
takes two vectors. The system property `vfdlibm.fault` plants a
fault, for this project's tests only, and works in the shipped jar too: never set it, including
through `JAVA_TOOL_OPTIONS`; a JVM that has it set prints a warning to `System.err` once. The
property and the fault names are for this
Expand All @@ -143,7 +145,7 @@ Arm.

## Supported JDKs

0.1.x supports **JDK 25 only**. The Vector API is incubating, and its API and C2's lowering of
0.2.x supports **JDK 25 only**. The Vector API is incubating, and its API and C2's lowering of
it move between JDK releases, so what a newer JDK does with these functions has not been
measured here. The contract, bit identity with `StrictMath`, is tested on JDK 25 and on no
other: every CI row, the nightly sweep and the benchmarks run Zulu 25. The example above is run
Expand Down