[PD] problem with correct numbers in pd double precision / problem with div and mod

hans w. koch hansw.koch at gmail.com
Wed Sep 23 17:17:32 CEST 2020


the onyl thing i donĀ“t like about the [makefilename %.0f] method is, that for big amount of data, it may clutter the symboltable.

so i started investigating alternativ ways of storing big numbers in chunks, using the [div] and [mod] objects.
but they only go until 2147483647 after which they overflow and produce wrong results.

anything special about this number? seems [div] and [mod] are not fully double yet.
demo patch attached

hans

-------------- next part --------------
A non-text attachment was scrubbed...
Name: big-numbers4_div-mod.pd
Type: application/octet-stream
Size: 985 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20200923/ed598b66/attachment.obj>
-------------- next part --------------


> Am 23.09.2020 um 10:34 schrieb hans w. koch <hansw.koch at gmail.com>:
> 
> lucas thanks for alerting me to
>> Attached patch edited to show that it is "no go" using txt files.
> its indeed a major headache :-(
> conclusion: the only reliable way using [text] with big numbers is with from/tosymbol.
> 
> i totally agree, it would be good to be able to write/read 64bit-arrays.
> what i like about [text] is multi column data - though it gets really slow with bigger files.
> 
> hans
> 
>> Am 21.09.2020 um 10:46 schrieb Lucas Cordiviola <lucarda27 at hotmail.com>:
>> 
>> On 9/20/2020 2:38 PM, hans w. koch wrote:
>>> but would it warrant opening an issue on github?
>> 
>> There should be some way to write/read 64bit arrays in Pd-double. [text] can be used for other stuff as it is not really efficient inside Pd (even if it worked without the actual issues).
>> 
>> I think the easiest feature request could be adding [soundfiler] the ability to "write" with the -raw flag (actually is only for "reading") and also making it able to handle 8 bytes per value.
>> 
>> A little discussion here might lead Hans or me to issue some request.
>> 
>> ?
>> 
>> 
>> Attached patch edited to show that it is "no go" using txt files.
>> 
>> 
>> 
>> Mensaje telepatico asistido por maquinas.
>> 
>> <big-numbers3.pd>_______________________________________________
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
> 



More information about the Pd-list mailing list