Hi there.
Im trying to use large numbers in pd to create a sequence. My problem is: at fifth div object, the numbers stop.
Any help?
cheers
Div object issue
Hi there.
Im trying to use large numbers in pd to create a sequence. My problem is: at fifth div object, the numbers stop.
Any help?
cheers
I think this has to do with the precision of 32-bit floats. You can only get integers accurate 24-bit precision, or up to about 1.678e+07. Beyond that, it starts skipping values in ever greater steps, and math operations can result in significant error.
Hi. Thanks for reply.
There is any solution to this problem? i dont understand about the bits
I assume you only want to work with integers? Floating-point isn't the most straightforward concept, and I'm not sure I fully understand it myself, but one of the key things to remember is that a 32-bit floating point number has 24-bit integer precision. In other words, when working strictly with integers, it is only reliable up to 2^24.
So you'll have to use smaller numbers, because you lose accuracy above 2^24. You can use negative numbers as well, so you're maximum integer range is -(2^24) to 2^24 (making it more of a 25-bit number). Beyond that range, floating-point becomes unreliable.
If you really need larger numbers, you'll have to treat them as two numbers, with one being the most significant and the other the least significant. Similar to how MIDI uses two controller numbers to increase the accuracy of pitch bend by taking two 7-bit numbers and treating them as a single 14-bit number. Assuming you only want to deal with positive numbers, you would basically have one number (least significant) count up to 2^24. Once it gets there, the other number (most significant) increases by 1 while the least significant one resets. This way, you can treat two 24-bit integers like a single 48-bit integer.
Yes, im using int numbers.
how i can, using the negative numbers, resolve this problem?
Can you post a pratical example?
Oops! Looks like something went wrong!