mschneider / solcpp

A fast Solana and Mango Markets C++ SDK
Other
40 stars 13 forks source link

Add MangoAccount and Health Calculations #32

Closed bdhobare closed 2 years ago

bdhobare commented 2 years ago

13

mschneider commented 2 years ago

a lot of the calculations convert to I80F48 way too early. double has only 64bits of precision and will introduce a lot of rounding errors.

bdhobare commented 2 years ago

Replaced the fixed implementation with the one from cpp-utilities and removed premature conversions to double from i80f48.