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

[Bug]: Loss in precision of EMC #1488

Open
Minion123456 opened this issue Feb 2, 2025 · 0 comments
Open

[Bug]: Loss in precision of EMC #1488

Minion123456 opened this issue Feb 2, 2025 · 0 comments
Labels
1: Bug Problem with the usage of a mod.

Comments

@Minion123456
Copy link

Mod

EE4

Mod version

equivalentexchange-1.20.4-1.0.11-neoforge.jar

NeoForge / Forge / Fabric version

1.20.4 Neoforge 20.4.239

Modpack & version

No response

What issue are you having?

When EMC is very high, the EMC of some items will have a loss in precision.
For example, the EMC of a diamond is 8192, but when I have 1 quintillion(10 to the power of 18) EMC, it seems that the EMC of a diamond becomes 8190. When I have 1 quintillion EMC and attempt to get a diamond from Transmutation Table/Tablet, my EMC will become 999,999,999,999,991,810 instead of 999,999,999,999,991,808, while the latter is correct.
When EMC is even higher (e.g. 10 to the power of 21), getting a diamond from Transmutation Table/Tablet will even cost 0 EMC.
This may be caused by error of float numbers. It seems that EMC is stored in a double-precision float variable.

Crashlogs

No response

Steps to reproduce

  1. Set your EMC to 1 quintillion.
  2. Get 1 diamond from Transmutation Table/Tablet, then your EMC will become 999,999,999,999,991,810
  3. Put the diamond back to Transmutation Table/Tablet, then your EMC will become 1 quintillion (exactly 10 to the power of 18)

Anything else to note?

No response

@Minion123456 Minion123456 added the 1: Bug Problem with the usage of a mod. label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1: Bug Problem with the usage of a mod.
Projects
None yet
Development

No branches or pull requests

1 participant