[PD] integers problem

Jack jack at rybn.org
Wed Nov 7 17:23:41 CET 2007


Hello Raphaël,
Look at this patch for the solution with your patch.

Look explanation of Frank and Tim :
http://lists.puredata.info/pipermail/pd-list/2006-03/036698.html
http://lists.puredata.info/pipermail/pd-list/2006-03/036668.html

exemple : 1.4 - [int 1.4] != 0.4 (NOT GOOD)
but : ((1.4*10) - ([int 1.4]*10))/10 == 0.4 (GOOD)

Jack

-------------- next part --------------
A non-text attachment was scrubbed...
Name: exemple2.pd
Type: application/octet-stream
Size: 1520 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20071107/ce80dd60/attachment.obj>
-------------- next part --------------


Le 5 nov. 07 à 20:47, Raphaël ILIAS a écrit :

> hello list !
>
> i have got a little problem... i try to format numbers
> as they may represent 4 integers with the following
> "decimal scheme" :
> a.bccdd
> so that 1.23456 becomes the list 1 2 34 56.
> i thougth this could be useful to store
> formatted-lists in arrays (maybe saw it's easier with
> data-structures or simply using multiple arrays).
> but what i don't understand is that, sometimes, i
> don't get the exact number in the latest decimals :
> instead of getting 56 i have 55.99985 or 56.00021 or
> something like that. is it bug from [int] or is it
> because of "32-bit floating point" format ?
> i've joined a patch to show the problem. i've tried
> many different ways but none of them worked.
> is it normal, have you got an idea ?
>
> thank you
>
> raphaël
>
>
>        
> ______________________________________________________________________ 
> _______
> Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers  
> Yahoo! Mail
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/ 
> listinfo/pd-list



More information about the Pd-list mailing list