[Bug 298891] ps(1), top(1), systat(1): Fix floating-point underflow / SIGFPE in weighted CPU calculation
Date: Wed, 30 Sep 2026 18:10:12 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=298891
Daniel Tameling <tamelingdaniel@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tamelingdaniel@gmail.com
--- Comment #2 from Daniel Tameling <tamelingdaniel@gmail.com> ---
Drive-by comment: If I see it correctly, all the relevant expressions are 1.0 -
exp(d). For the case where you clamp d, this will evaluate to exactly 1.0
because of floating point rules. (Even for values much larger than -700.) There
is no point of calling the exp function in that case. So instead of clamping
the argument I would just set the expression to 1 inside the if-branch.
--
You are receiving this mail because:
You are the assignee for the bug.