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
pkg/math: fix Log2E and Log10E constant expressions
They were a division of integer constants, which got truncated,
meaning that Log2E rounded down to 1 and Log10E to 0.
To force them to be floating-point constants, like the CUE ones,
turn the dividend into a floating-point constant.
I found this problem since staticcheck correctly pointed out
a constant integer division which resulted in zero:
math.go:156:11: the integer division '100… / 230…' results in zero (SA4025)
Signed-off-by: Daniel Martí <[email protected]>
Change-Id: I36ee54a7c8aff06368016b855536a9614dbbf229
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/557322
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
Reviewed-by: Paul Jolly <[email protected]>
0 commit comments