[PD] PD n00b: counter kludge

pix pix at test.at
Wed Jul 23 22:50:38 CEST 2003


values in pd are floating* point values. floating point numbers can be
very large or very small, but their accuracy is limited depending on how
large or small they are. generally the accuracy is best with values close
to +/- 1.

the upshot of this is that there is a large floating point number (lets
call it x), such that x + 1 = x (as far as the computer is concerned),
because the accuracy is less that 1. similarly there is some very small
floating point number (lets call it y) so small that 1 + y = 1.

the "very large" and "very small" numbers depend on the floating point
implementation on the machine running pd.

so, if you keep incrementing some value, eventually (possibly after a few
minutes or a few years depending on the situation) the value will stop
incrementing and appear to "stick".

* - guenter's strongarm port of pd uses fixed point math i think, but this
only makes the situation worse for purposes of this discussion ;)

pix.

On Wed, 23 Jul 2003 12:38:55 -0700
Matthew Allen <matthew at lith.com> wrote:

> Is there a problem with this? I remember a discussion about it a while
> ago, but I don't think there was ever a conclusion.
> 
> m.
> 
> > -----Original Message-----
> > From: Marc Lavallée [mailto:odradek at videotron.ca]
> > Sent: Wednesday, July 23, 2003 12:20 PM
> > To: pd-list at iem.kug.ac.at
> > Subject: Re: [PD] PD n00b: counter kludge
> > 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > Le 23 Juillet 2003 14:11, Matthew Allen a écrit :
> > > 	They both do the same thing, I think the second one is a little
> > > cleaner and easier to read/figure out what is going on.
> > 
> > Of course I don't agree, since I prefer my patch...
> > One problem with Frank's patch: the f object is indefinitely
> > incremented.
> > 
> > - --
> > Marc
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.1 (GNU/Linux)
> > 
> > iD8DBQE/Ht/SQdzoeKQ0PccRAgknAKC+SM8N8qI0QiFEEw4awX7MCSkAKgCcCsB6
> > u2ElADPZOaVniwqO1foJTug=
> > =2St8
> > -----END PGP SIGNATURE-----
> > 
> > 
> > _______________________________________________
> > PD-list mailing list
> > PD-list at iem.at
> > http://iem.at/cgi-bin/mailman/listinfo/pd-list
> > 
> > 
> > _________________________________________________
> > Scanned on 23 Jul 2003 19:37:18
> > Scanning by http://erado.com
> 
> _______________________________________________
> PD-list mailing list
> PD-list at iem.at
> http://iem.at/cgi-bin/mailman/listinfo/pd-list


-- 




More information about the Pd-list mailing list