Without seeing your code it’s hard to say something certain. From what you wrote it seems you might be affected by floating point error. Floating point numbers cannot be accurately represented in computers. This makes mathematical operations on them inaccurate, one explicit example of it is: 0.1 + 0.1 + 0.1 !== 0.3
Please update the message to include your code. The code was too long to be automatically inserted by the help button.
When you enter a code, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.