[PD] why does PD round numbers? (in tables, in messageboxes, etc)

Pedro Lopes pedro.lopes at ist.utl.pt
Sun Apr 8 13:26:35 CEST 2012


If this happens, then it should be really given some thought.

<thinking out loud>

I guess one of the downsides of graphical dataflow is that we see what we
get (kinda like WYSIWIG editors), therefore there should be a way to always
get dirty and non rounded numbers on screen and onto loaded patches.
Otherwise we are missing something essential. I see multiple ways pd could
do it:

1) saving to file is always preserving precision and no rounding; GUI by
default shows rounded versions for space sake or to avoid messy patches;
tough the user has the possibility to choose a overall setting or per GUI
object that enables him to see the full thing.

or conversely

2) saving to file is always preserving precision and no rounding; GUI by
default shows the real stored number; tough the user has the possibility to
choose a overall setting or per GUI object that enables him to see only see
rounded version on the object.

</thinking out loud>

On Sun, Apr 8, 2012 at 4:58 AM, Martin Peach <martin.peach at sympatico.ca>wrote:

> It's because Pd saves the value by printing it as text into the patch file
> using a reduced precision format specifier (%g instead of %f, or %0.6f) so
> that the numbers look good on screen, with no extra zeros for example.
> I don't like it either.
>
> Martin
>
> On 2012-04-07 22:40, Angakok Thoth wrote:
>
>> that's not what i mean.
>>
>> i mean, that when i write 12345678 (must be 100% accurate within 32bit
>> float with 24bit mantissa) into an array and read it from there, it's
>> still 12345678.
>> but when i save that patch, close it and reload it, and i read from the
>> array, i get 12345700.
>>
>> nothing to do with limitations of floating point number.
>>
>>
>> On Sun, Apr 8, 2012 at 4:23 AM, i go bananas <hard.off at gmail.com
>> <mailto:hard.off at gmail.com>> wrote:
>>
>>    http://en.wikipedia.org/wiki/**Floating_point<http://en.wikipedia.org/wiki/Floating_point>
>>
>>
>>
>>
>> ______________________________**_________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management ->  http://lists.puredata.info/**
>> listinfo/pd-list <http://lists.puredata.info/listinfo/pd-list>
>>
>
>
> ______________________________**_________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/**
> listinfo/pd-list <http://lists.puredata.info/listinfo/pd-list>
>



-- 
Pedro Lopes (HCI Researcher / MSc)
contact: pedro.lopes at ist.utl.pt
website: http://web.ist.utl.pt/pedro.lopes /
http://pedrolopesresearch.wordpress.com/ | http://twitter.com/plopesresearch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120408/14e3bf9c/attachment-0001.htm>


More information about the Pd-list mailing list