<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>ntysdd&apos;s blog</title><description>Notes on floating point, JIT compilers, math, and AI tools.</description><link>https://ntysdd.github.io/</link><item><title>Two NaNs, One Expression: The Bits Nobody Promised</title><link>https://ntysdd.github.io/posts/two-nans-one-expression-the-bits-nobody-promised/</link><guid isPermaLink="true">https://ntysdd.github.io/posts/two-nans-one-expression-the-bits-nobody-promised/</guid><description>`0.0 / 0.0` gives one NaN when `javac` folds it and a different one when the CPU divides it, on the
same JVM. The JVM spec leaves the bit pattern to the hardware and IEEE 754 does not specify it either,
so my port now only promises the finite results.
</description><pubDate>Mon, 23 Nov 2026 17:18:00 GMT</pubDate></item><item><title>One in 2^62: When `(int)(x + 0.5)` Rounds the Wrong Way</title><link>https://ntysdd.github.io/posts/one-in-2-62-when-int-x-plus-0-5-is-wrong/</link><guid isPermaLink="true">https://ntysdd.github.io/posts/one-in-2-62-when-int-x-plus-0-5-is-wrong/</guid><description>`(int)(x + 0.5)` returns the wrong integer for exactly one non-negative double whose cast to
`int` is defined, and for four million non-negative floats. The `long long` version is wrong for
half of the nanosecond timestamps in one `2^52`-wide window.
</description><pubDate>Wed, 21 Oct 2026 16:06:31 GMT</pubDate></item><item><title>How To Implement a Correctly-rounded powf(x, 3)</title><link>https://ntysdd.github.io/posts/how-to-implement-a-correctly-rounded-powf-x-3/</link><guid isPermaLink="true">https://ntysdd.github.io/posts/how-to-implement-a-correctly-rounded-powf-x-3/</guid><description>`x * x * x` is wrong for about 8.5% of all positive finite float32 inputs, while there actually is an easy way
to implement a correctly-rounded one.
</description><pubDate>Thu, 08 Oct 2026 10:01:14 GMT</pubDate></item><item><title>One ULP Off: A Floating-Point Bug That Wasn&apos;t in the C Runtime I Blamed</title><link>https://ntysdd.github.io/posts/one-ulp-off-a-floating-point-bug-that/</link><guid isPermaLink="true">https://ntysdd.github.io/posts/one-ulp-off-a-floating-point-bug-that/</guid><description>Some doubles came back one bit off when parsed, and the culprit was not the 30-year-old CRT I had linked against —
it was the C99 stdio shim sitting on top of it, which parses floating point through 80-bit long double. A short
story about double rounding, and about verifying which function you actually call.
</description><pubDate>Wed, 07 Oct 2026 12:01:57 GMT</pubDate></item></channel></rss>