在使用 NewFromFloat 函数时,出现了该异常。解决办法:在传递 float64 数据时,增加如下判断:if math.IsNaN(f) || math.IsInf(f, 0) { return 0 }