[PD] [OT] "processing" application
Martin Peach
martin.peach at sympatico.ca
Sun Oct 15 23:05:37 CEST 2006
Mathieu Bouchard wrote:
> On Sat, 14 Oct 2006, Martin Peach wrote:
>
>>> It's an integer multiplied by a power of two. That's about as layman
>>> as it can reasonably get. In Pd the integer is between 2^23 and 2^24
>>> and the power of two is between 2^-149 and 2^106.
>> It's not exactly an integer since it's supposed to be a fixed point
>> number between 1 and just less than 2, multiplied by a power of two.
>
> did you realize that your definition and my definition are equivalent ?
Yes. What I meant was that the number is not an integer in the
mathematical sense. A float in memory is three integers packed together
into 32 bits, and of those integers is missing its most significant bit.
>
> why do you think that i say that the multiplicator is between 2^-149
> and 2^106, instead of 2^-127 to 2^129 ? (note: that is an off-by-one
> error, so I really meant 2^-150 to 2^105)
>
>> In the float the binary point starts out at the left and the power
>> effectively moves it.
>
> It can "start" anywhere you want, provided that the relation between
> "characteristic" and "exponent" is appropriately chosen...
But once you have chosen the relation you can't move the binary point.
It's a fixed point number. If the point has to move the number is called
denormal. Normalizing usually means fitting something into a range of
0-1, so it makes sense that a normalized float is using a number close
to 1 rather than 2^23, but otherwise it makes no difference.
>
>> The thing about the laity is that they are free to learn on their own
>> and can thereby acquire even more knowledge than those who have gone
>> through the system which only tells them what it wants them to know.
>
> Exactly. This allows me to teach floats in an alternative way that
> doesn't involve putting the binary point to the left.
>
>> For example this is the representation of the number 1.5 X 2^20 =
>> 1572864 (aka UNITBIT32) in
>> IEEE Standard 754 Double Precision Storage Format (double):
>
> I was only talking about single precision floats, because that's the
> only thing that PureData supports today.
Internally pd uses doubles, for example in osc~.c. A double works just
like a float but uses twice as much space so it can represent more numbers.
Martin
More information about the Pd-list
mailing list