-
Notifications
You must be signed in to change notification settings - Fork 2
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
Should Fraction
be stored as a mixed number?
#5
Comments
I don’t really have a preference, would go for one that can be optimised to be faster though. |
I think 3 ints should be enough. With wholes split off numerators should never be too high. |
yeah, and though Alex did worry that LCMs might get too big for an int, that's why we simplify on every op. The worst LCM I can think of reasonably happening is 81,000 (LCM of 1,000 and 81, which is also a multiple of 3, 4, 5, 6, 8, 9, 10, 12, and most other common units folks would want). |
Sounds good to me too. At least have the person who makes the changes document all the decisions. |
should whole be stored as a long/biginteger so that it can store more fluid? |
Not much else to say, really. We're just deciding whether to:
long numerator
andlong denominator
as we are right nowint whole
,int numerator
, andint denominator
int whole
,long numerator
, andlong denominator
The text was updated successfully, but these errors were encountered: