You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P3] effectiveEffort preserves signed zero differently across platforms #37
Swift and Kotlin return different IEEE-754 zero signs for one effectiveEffort input ordering.
This was found by the Strain differential rollout tracked in #17.
Minimal reproduction
live = +0.0
stored = -0.0
Observed behavior
Platform
Result
IEEE-754 bits
Swift
-0.0
8000000000000000
Kotlin
+0.0
0000000000000000
With the operands reversed, both implementations return +0.0.
Likely cause
The platforms use different maximum semantics for equal signed-zero operands: Swift preserves the second operand in this case, while kotlin.math.max canonicalizes the result to positive zero.
Impact
The numeric and displayed value remains zero. The difference matters only for exact serialization, hashing, or bit-level parity.
Severity: P3.
Acceptance criteria
Decide whether effectiveEffort promises numeric equality or exact IEEE-754 parity.
If exact parity is required, normalize signed zero identically on both platforms.
Add mirrored deterministic tests for both operand orders.
No hardware testing is required; this is pure analytics behavior.
Fixed upstream by ryanbr#1792 (merged), which canonicalizes signed zero in effective effort
so a live and stored value of 0.0 returns +0.0 identically on both platforms. Closing.
Activity
bhelm commentedon Sep 7, 2026
Fixed upstream by ryanbr#1792 (merged), which canonicalizes signed zero in effective effort
so a live and stored value of
0.0returns+0.0identically on both platforms. Closing.