Unexpected results setting Synth args to large numbers #4853
Labels
Comments
|
the server uses 32-bit floats for signals; you are seeing rounding error because you are performing operations on numbers of very different magnitudes. if you swap your order of operations you would get the answer you expect. see also this stackexchange answer or the classic 'what every computer scientist should know about floating point arithmetic' |
|
Thanks for the quick answer! I have some reading to do :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Steps to reproduce
Expected vs. actual behavior
I'm seeing unexpected results passing large-ish numbers to Synth args – it seems like they aren't correctly set within the Synth.
The code example should be fairly self explanatory. Varying the numbers gives different incorrect results. I feel like I may be missing some kind of restriction or...?
For context, I discovered this while trying to pass frame numbers in to a sample player.
The text was updated successfully, but these errors were encountered: