[PD-dev] [ pure-data-Patches-2952880 ] a partial float fix

SourceForge.net noreply at sourceforge.net
Sat Aug 21 22:27:15 CEST 2010


Patches item #2952880, was opened at 2010-02-16 16:33
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=2952880&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: bugfix
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Martin Peach (mrpeach)
Assigned to: Miller Puckette (millerpuckette)
Summary: a partial float fix

Initial Comment:
Pd currently doesn't store floats to their full precision because atom_string uses the %g format specifier to print them into the binbuf.
As a result 24-bit numbers lose precision.
This patch changes the format specifier to %f and also adds a routine to chop off trailing zeros and the decimal point if nothing is to the right of it.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2010-08-21 20:27

Message:
I thought I had patched my source but somehow hadn't... just tried the
patch and it has a problem -
if you type 1e20 in a message box and duplicate it you get a ridiculous
string.  Somehow a fix is
needed that can deal with exponential notation but still have the
advantages of %f when appropriate.

----------------------------------------------------------------------

Comment By: Hans-Christoph Steiner (eighthave)
Date: 2010-08-20 19:07

Message:
This one did not seem to get accepted, or at least its not in git as of
today.  There is a commit in git (2488dcef8a72906cd1fa3785ef549ea7b33533b5)
marked "patch 2952880 - a partial float fix", but that commit makes only a
small change to extra/expr~/vexp_if.c.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=2952880&group_id=55736



More information about the Pd-dev mailing list