Open
Description
Is this a bug in companion itself or a module?
- I believe this to be a bug in companion
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Incrementing a custom internal variable by 0.1 has rounding errors making numbers 18 significant digits long
Steps To Reproduce
- Create internal Variable $(internal:custon_round)
- Set Start value to 0.5
- Make a Button
- Add Action "internal: Custom Variable: Set with expression"
- Change Custom Variable to "A custom Variable (internal:custon_round)
- input "$(internal:custom_round)+0.1
- Press Button 2-5 times and see the rounding issue
Expected Behavior
After 3 presses expected output is 0.8, actual output is 0.7999999999999999
Environment (please complete the following information)
- OS: Windows 11 Pro
- Browser: Chrome
- Companion Version: v3.4.1
Additional context
First couple of button presses add properly, but the farther you get from the starting value the more off it gets.