bbgo_origin/pkg/fixedpoint/dec_dnum_test.go

15 lines
260 B
Go
Raw Normal View History

2022-02-15 02:56:09 +00:00
//go:build dnum
package fixedpoint
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestDelta(t *testing.T) {
f1 := MustNewFromString("0.0009763593380614657")
f2 := NewFromInt(42300)
assert.InDelta(t, f1.Mul(f2).Float64(), 41.3, 1e-14)
}