Was attempting to compute the value 2^32 - 1. The power operation produced the correct value but the subtract operation did not actually perform the subtraction. The output equaled the input. Investigated a bit more and it looks like the math to add and subtract does not work correctly (or at all) with values greater than 2^24.
This screenshot shows a correct value for 2^24 -1 but an incorrect value for 2^24 + 1:
I was just curious to see what would be the problem here but as suddenly i only added an INT to the power function result it already showed the reason,also with substraction.
They are Signed 32 bits nodes. So calculation with them will fail above 30^2. So you only can use Float values to represent something. Don’t know why it would fail with something like 2^28 in your case as you have experienced, perhaps there is more to it beyond my testing as in i didn’t reproduced your node flow. only the power to int & substract.
I think this creates a situation where there might be a lot Signed Int32 operations in MNode while there is also perhaps a need for a Unsigned int32 or it’s just making sure that some operation should not produce unsigned int32 and that there is more a need for different nodes for bot worlds.
I was using all float values for my scenario (not int) but the limit at 24 bits hints at some kind of integer or fixed point math going on under the hood. Coincidentally, the Integer to Bits and Bits to Integer nodes max out at a 24 bit width … possibly due to the same internal limitation?
You’re right, tonecarver. MNodes stores numbers in a way that keeps them exact only up to 16,777,216 (that’s 2^24). Above that, very big numbers get rounded, so adding or subtracting 1 gets lost in the rounding. That’s also why Integer to Bits and Bits to Integer stop at 24 bits.
For now, exact whole-number math works up to 16,777,216. I’m looking at how to raise that limit, although it’s quite a big change.
Got it, thanks. Is that info somewhere in the online manual (apologies if I missed it). If not, could you add a section describing supported data ranges and things like what precision is used for data, CV, audio, etc? A nice table describing the supported ranges would be helpful in situations like this.