We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cef9e6a commit 4b916c3Copy full SHA for 4b916c3
backend/util/bigcounter.go
@@ -159,6 +159,8 @@ func (n *BigCounter) DivideBy(other *BigCounter) float64 {
159
func (n *BigCounter) DivideSafeBy(other *BigCounter) float64 {
160
if !other.isExtended() && other.base == 0 {
161
return 0.0
162
+ } else if other.isExtended() && other.extended.Cmp(big.NewInt(0)) == 0 {
163
+ return 0.0
164
}
165
return n.DivideBy(other)
166
0 commit comments