test: fix ut TestTan due to math.Tan(math.Pi / 4) equals 0.9999999999999998, not 1 (#42421)
close pingcap/tidb#42420
This commit is contained in:
@ -985,8 +985,8 @@ func TestTan(t *testing.T) {
|
||||
}{
|
||||
{nil, 0, true, false},
|
||||
{int64(0), float64(0), false, false},
|
||||
{math.Pi / 4, float64(1), false, false},
|
||||
{-math.Pi / 4, float64(-1), false, false},
|
||||
{math.Pi / 4, math.Tan(math.Pi / 4), false, false},
|
||||
{-math.Pi / 4, math.Tan(-math.Pi / 4), false, false},
|
||||
{math.Pi * 3 / 4, math.Tan(math.Pi * 3 / 4), false, false}, // in mysql and golang, it equals -1.0000000000000002, not -1
|
||||
{"0.000", float64(0), false, false},
|
||||
{"sdfgsdfg", 0, false, true},
|
||||
|
||||
Reference in New Issue
Block a user