On Fri, 2008-11-07 at 09:45 +0100, IOhannes m zmoelnig wrote:
Mark Sexton wrote:
Hi I need PD to make simple but accurate calculations for a sonification project. However there seems to be a problem working accurately with floats that have 7 or more digits in total (before or after the decimal point). PD always seem to round the figure to 6 digits whether in a calculation, or even typing a 7+ digit float into a number box e.g. 1234.5678 rounded to 1234.57
I've got a couple of ugly hacks to work around for now, but it seems a fairly fundamental thing to do, so would be grateful to hear if I'm missing a simple way to get PD to work accurately with floats of any arbitrary length above 6 digits.
you don't need anything. Pd does uses IEEE floating point values for numbers, you don't loose a single bit. it's only the GUI that likes to round the numbers when displaying it. internally everything is "correct" (as far as it is possible using single precision floats)
you could change the "width" of a number-box to see more digits.
still only 6 digits are displayed. altough pd works internall with IEEE 32bit floating values, i couldn't think of an easy way to get them out of pd. both, print and the numberbox truncate the numbers.
two ways - not very feasible, though - to get full precision out of pd come to my mind:
numbers from there
or has someone a better idea?
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de