Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use fp3 container #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

use fp3 container #11

wants to merge 1 commit into from

Conversation

nikolaydubina
Copy link
Owner

@nikolaydubina nikolaydubina commented Nov 30, 2024

using exposing decimal container is good so that other code that uses this money type can also work with coefficient and other numerics expressed in decimals of compatible type. such as if we have currency in fp3 and some other coefficients in fp3, then they can work together

however, this does not work for now. currencies leak precision with less that 3 units

then there is issue with amount is in fp2 and coefficient in fp3, leading to leaks of money precision

using fp2 will not help. as KRW and JPY will leak into fractions.

no simple way to address this for now. keeping dynamic precision for now. sigh.

for sake of currency precision, not exposing underlying decimal container.

keeping PR open for future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant