ldtteam / Aequivaleo

Analysis engine and mediator mod for analyzing recipes and equivalencies of items, blockstates and other game objects in minecraft.
GNU General Public License v3.0
5 stars 4 forks source link

Using double for compound values. #3

Closed MaPePeR closed 4 years ago

MaPePeR commented 4 years ago

At the moment it looks like the analyzer and compound values are hard coded to be double.

I consider this somewhat risky, as some Minecraft players and mods LOVE huge numbers, which might result in weird float arithmetic errors down the line when adding small numbers to big numbers (which might be an interesting game mechanic on its own, but is probably not desired here).

I'd prefer something like BigFraction. So I'd recommend to not have it hard coded, but allow for the number type to be changeable without rewriting everything.

marchermans commented 4 years ago

Not really relevant in my eyes, the maximum of a double is: 1.7*10^308 which suffices. If we run into it we will see that then.