math/pow10: remove overlapping boundary (n=0)
Both the first and second conditions include n=0, creating an
implicit logic that relies on order of evaluation. Testing has shown
that this modification will not affect performance or assembly code
in linux/amd64.
diff --git a/src/math/pow10.go b/src/math/pow10.go
index c31ad8d..6f84db0 100644
--- a/src/math/pow10.go
+++ b/src/math/pow10.go
@@ -33,7 +33,7 @@
return pow10postab32[uint(n)/32] * pow10tab[uint(n)%32]
}
- if -323 <= n && n <= 0 {
+ if -323 <= n && n < 0 {
return pow10negtab32[uint(-n)/32] / pow10tab[uint(-n)%32]
}
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |