coblox / nectar

GNU General Public License v3.0
0 stars 1 forks source link

Use BigRational #17

Closed D4nte closed 4 years ago

D4nte commented 4 years ago

Using num::BigRational is actually not an option because there is hidden precision loss using the crate:

thread 'publish::tests::given_a_rate_and_spread_return_order_with_both_amounts' panicked at 'assertion failed: `(left == right)`
  left: `103000000000000005607`,
 right: `103000000000000000000`', src/publish.rs:252:9

As we are managing money, this is not acceptable. Back to rolling it out myself with https://github.com/coblox/nectar/pull/16

thomaseizinger commented 4 years ago

Removed myself because I think this is stale.

luckysori commented 4 years ago

Should we close this one, @D4nte?