--
Hans-Christoph Steiner
mobile: +1 347 850 4872 work: +1 718 360 4872
On Wed, 06 Jul 2011 15:26 -0400, "Martin Peach"
martin.peach@sympatico.ca wrote:
> >> (Also, someone could make this "an XXX bits float can store a YYY bits
> >> integer" a bit more clear as I personally still don't really understand
> >> it.
> >> I also remember vaguely some criticism of this system, that it is not
> >> very
> >> efficient? Matju? If you guys explain it here on the list I'll be happy
> >> to
> >> add it to the wiki.)
> >>
> >> Andras
> >
> > With a 32-bit float, some of the bits go to representing the exponent
> > part, therefore there is not the full 32-bits available to represent an
> > integer.
> >
http://en.wikipedia.org/wiki/Significand
> >
>
> It's worse than that though. Pd uses the %g format specifier when it
> writes out the pd patch (e.g. printf("%g", number)), so floats get
> simplified. It's possible to use a high precision number by entering it
> in the patch but when you reopen the patch it will have been simplified.
>
> Martin
>
Yes, it does loose a bit with the %g. AFAIK, the %g just simplifies a
little bit, i.e. down to 6 decimal digits while the actual number format
can represent about 6.5 decimal digits.
.hc