[PD] symbol to float

Jack jack at rybn.org
Fri Apr 21 19:08:00 CEST 2017


Yes it is a bug in my abs, the problem seems to come from the [i ]
object in [pd symbol2int] which return float -2.14748e+09 if you send
float 6.89756e+14.
I have replaced it with [f ] and the result of the symbol
"8.689756393432365" is now 8.68976 which now looks correct.
Patchs are attached.
++

Jack



Le 21/04/2017 à 18:23, hans w. koch a écrit :
> hi jack,
> 
> i tried with "array-symbol2float“, however feeding it „8.689756393432365“ (a messagebox with this number as a symbol) 
> would only produce output, when i put
> list prepend symbol
> list trim
> between the message box and array-symbol2float.
> but then this output was 7.99998, which seems like the first digit of my number converted to float.
> 
> strange…
> 
> but otherwise thanks for the pointer to these abstraction. will have to investigate.
> 
> best hans
>> Am 21.04.2017 um 16:12 schrieb Jack <jack at rybn.org>:
>>
>> This link could help... (lokk at the bottom of the page)
>> https://www.mail-archive.com/pd-list@lists.iem.at/msg05406.html
>> ++
>>
>> Jack
>>
>>
>>
>> Le 21/04/2017 à 15:40, hans w. koch a écrit :
>>> hello,
>>>
>>> pd-vanilla question:
>>> trying to harness geodata from an xml file, i need to parse lines like this: <gx:coord>8.689756393432365 49.4138 109.18</gx:coord>
>>> with a combination of "list split“ and „list fromsymbol“ i end up with three message boxes, „8.689756393432365“, „49.4138“ and „109.18“.
>>> problem is, that the message box containing „8.689756393432365“ is a symbol and i can´t seem to find a way to reconvert it to a float, other then sending it thru a netsend/netreceive pair.
>>> (as per this tip from 2007: https://lists.puredata.info/pipermail/pd-list/2007-02/047499.html).
>>>
>>> its working fine, but i was wondering, if this really is the only vanilla solution?
>>>
>>> i might well be staring at the obvious and not seeing it...
>>> thanks in advance for any other pointers!
>>>
>>> best hans
>>>
>>> www.hans-w-koch.net
>>>
>>>
>>> _______________________________________________
>>> Pd-list at lists.iem.at mailing list
>>> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>>>
>>
>>
>> _______________________________________________
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: array-symbol2float.pd
Type: application/puredata
Size: 13073 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20170421/d69b3bbd/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: array-symbol2float-help.pd
Type: application/puredata
Size: 814 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20170421/d69b3bbd/attachment-0003.bin>


More information about the Pd-list mailing list