[PD] passing integers
Miller Puckette
mpuckett at man104-1.ucsd.edu
Wed Jan 16 20:07:01 CET 2002
Looks like the maxuimum you can put in a number box without it reverting
to exponential notation is 999999. That's enough for 18 bits of
masking (using the decimal digits for three bits each so that you
can actually read the masks.) For more than 18 bits worth, it's probably
best to use lists.
cheers
Miller
On Wed, Jan 16, 2002 at 04:33:01PM +0100, Orm Finnendahl wrote:
> Hi,
>
> I'm trying to use integers in pd externals, but found out, there is no
> such type. Therefor it seems to be impossible to deal with big integer
> numbers (ca. 2 ^ 20 and above). Since I'm using them for masking
> purposes, the numbers have to be transmitted correctly between objects
> and I would like to use at least 32-bit precision
>
> My question:
>
> 1. Is it possible to have integer inlets in externals?
>
> 2. How could a message preserve the precise value of the integer
> (I found out, typing a big integer in a message box and
> closing/reopening the patch results in a cast to a real number with
> 7 in radix 10 notation)?
>
> 3. If all this fails: How exact can a float represent an integer
> number (up to which value would the following function print
> "equal")?
>
> void myclass_float (t_myclass *x, t_floatarg f)
> {
> int i;
>
> i = f;
>
> if (i == f)
> post("equal");
> else
> post("not equal");
> }
>
>
> Thanx in advance,
>
> Orm
More information about the Pd-list
mailing list