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
On investigating further, it seems that the value of rightBrac is turning out to be negative. On further investigation, it is found that the value of the averageRate variable is "0" for this particular test, and hence a division by 0 is happening there, which results in a +Inf, now the rest of the operations convert this into 0s on x86 and -1 on rest arches.
Here's a sample code for instance:
package main
import
(
"time"
"fmt"
);
func main() {
var rate float64 = 0
max := 10
min := 0
res:= (time.Duration((1 / rate)*(float64(max) - float64(min))) * time.Second).String()
fmt.Println(res)
}
Output on x86: 0s
Output on arm64/other arches: -1s
For now, I've applied this patch to force a 0s value if rightBrac is 0s:
Hi @schollz
Thanks for your work on progressbar :)
However, while running tests on !x86 architectures, one of the test fails -- in particular this one:
On investigating further, it seems that the value of rightBrac is turning out to be negative. On further investigation, it is found that the value of the
averageRate
variable is "0" for this particular test, and hence a division by 0 is happening there, which results in a +Inf, now the rest of the operations convert this into 0s on x86 and -1 on rest arches.Here's a sample code for instance:
Output on x86: 0s
Output on arm64/other arches: -1s
For now, I've applied this patch to force a 0s value if rightBrac is 0s:
But I admit this might not be the best way to get around it. Please consider fixing this
The text was updated successfully, but these errors were encountered: