8000 Tags · nieomylnieja/decimal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tags: nieomylnieja/decimal

Tags

v1.2.0-rc.1

Toggle v1.2.0-rc.1's commit message
remove mgo

v1.3.1

Toggle v1.3.1's commit message
Version 1.3.1 release

v1.3.0

Toggle v1.3.0's commit message
Version 1.3.0 release

v1.0.0-rc.1

Toggle v1.0.0-rc.1's commit message
impl: Go mod; add decoder and encoder for official mongo driver

v1.2.0

Toggle v1.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Release version 1.2.0 (shopspring#175)

v1.2

v1.1.0

Toggle v1.1.0's commit message
Release version 1.1.0

v1.0.1

Toggle v1.0.1's commit message
Release version 1.0.1

v1.0.0

Toggle v1.0.0's commit message
Release version 1.0.0

1.1.0

Toggle 1.1.0's commit message
Make NewFromFloat respect the precision of the input (shopspring#100)

* Make NewFromFloat respect the precision of the input

Restores the previous behaviour where input converted from float is truncated at the precision of the float.

The precision is depending on the actual value. Simply making it 15 digits would make it faster, but would in some cases lose some precision. So the code from the stdlib that does this calculation (very well) has been included.

Lots of good articles here: https://www.exploringbinary.com/decimal-precision-of-binary-floating-point-numbers/

Performance is around the same as the previous string roundtrip since it basically does the same, but allocations are a bit less.

`BenchmarkNewFromStringFloat` is the old method, `BenchmarkNewFromFloat` is the new.

```
BenchmarkNewFromFloatWithExponent-8     10000000               260 ns/op             174 B/op          4 allocs/op
BenchmarkNewFromFloat-8                  2000000               744 ns/op              90 B/op          2 allocs/op
BenchmarkNewFromStringFloat-8            2000000               822 ns/op             258 B/op          6 allocs/op
```

* Update Sin/Tan/Cos tests.

1.0.1

Toggle 1.0.1's commit message
RequireFromString (shopspring#73)

fmt
0