First I off, I forgot one thing in my analysis of the bitness of Pd's
integers: the sign. So its 20 bits, I forgot the bit for the sign
( -999999 to 999999). So this leads me to the question which Matju
brought up: the internal representation (t_float) should be able to
store 23 bits of integer information. Why does Pd only display up to
20bits on integer data? If Pd displayed 7 digits plus sign, it would
cover the 23 bits...
.hc
News is what people want to keep hidden and everything else is
publicity. - Bill Moyers
On Sun, 18 Jun 2006, Hans-Christoph Steiner wrote:
First I off, I forgot one thing in my analysis of the bitness of Pd's integers: the sign. So its 20 bits, I forgot the bit for the sign ( -999999 to 999999). So this leads me to the question which Matju brought up: the internal representation (t_float) should be able to store 23 bits of integer information. Why does Pd only display up to 20bits on integer data? If Pd displayed 7 digits plus sign, it would cover the 23 bits...
if you include the sign as part of the mantissa, then it's 24 bits. you need slightly more than 7 digits to cover all that range. you also need to take the space taken by writing the decimal point.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
On Jun 19, 2006, at 3:36 PM, Mathieu Bouchard wrote:
On Sun, 18 Jun 2006, Hans-Christoph Steiner wrote:
First I off, I forgot one thing in my analysis of the bitness of
Pd's integers: the sign. So its 20 bits, I forgot the bit for the
sign ( -999999 to 999999). So this leads me to the question which
Matju brought up: the internal representation (t_float) should be
able to store 23 bits of integer information. Why does Pd only
display up to 20bits on integer data? If Pd displayed 7 digits
plus sign, it would cover the 23 bits...if you include the sign as part of the mantissa, then it's 24 bits.
you need slightly more than 7 digits to cover all that range. you
also need to take the space taken by writing the decimal point.
0111 1111 1111 1111 1111 1111 (23-bits) = 8388607, not counting the
sign, why would you need more than 7 digits to represent 8388607 in
decimal?
.hc
I have the audacity to believe that peoples everywhere can have three
meals a day for their bodies, education and culture for their minds,
and dignity, equality and freedom for their spirits. - Martin
Luther King, Jr.
On Mon, 19 Jun 2006, Hans-Christoph Steiner wrote:
On Jun 19, 2006, at 3:36 PM, Mathieu Bouchard wrote:
if you include the sign as part of the mantissa, then it's 24 bits. you need slightly more than 7 digits to cover all that range. you also need to take the space taken by writing the decimal point.
0111 1111 1111 1111 1111 1111 (23-bits) = 8388607, not counting the sign, why would you need more than 7 digits to represent 8388607 in decimal?
Because the most significant bit of the mantissa, not counting the sign, is implicit and assumed to be 1 in almost all cases, except zero, NaN and Infinities. Therefore mantissas don't range from 0 to 8388607, they range from 8388608 to 16777215. However, when writing in decimal ascii representation, that bit is always explicit. For numbers 1<=x<2, for example, x is always printed starting with "1", which can be considered as a completely wasted digit.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada