bbgo_origin/pkg/fixedpoint/dec_dnum_test.go
2022-02-15 12:01:39 +09:00

15 lines
260 B
Go

//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)
}