feat(sd59x18): add sign function (#285)
* feat(sd59x18): add sign function Closes #215. Adds a sign (signum) function for SD59x18 that returns UNIT (1e18) for positive inputs, ZERO (0) for zero, and -UNIT (-1e18) for negative inputs. Cannot revert, including for MIN_SD59x18. Requested by @pcaversaccio, filed by @Amxx. Tests mirror abs.t.sol. * refactor(sd59x18): polish sign implementation - make all sign outcomes explicit\n- avoid compiler warnings from name shadowing and test mutability --------- Co-authored-by: Luyicheng-Agent <agent@luyicheng.local> Co-authored-by: Paul Berg <prberg@proton.me>
L
Luyicheng-Agent committed
900f9b33bfc2be9223cf9636068bb2155fdff3c4
Parent: 1f1d540
Committed by GitHub <noreply@github.com>
on 8/3/2026, 9:00:18 AM