Re: [PD] removing NaN pure-pd
Damian Stewart wrote: is there a pure Pd way to remove NaNs? i can't use expr with rjdj.. i thought expr is part of the RjDj distro... but then: you can test while i cannot. and this might be one of the later this week licensing things. fgmasdr IOhannes ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN pure-pd
Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote: Damian Stewart wrote: is there a pure Pd way to remove NaNs? i can't use expr with rjdj.. i thought expr is part of the RjDj distro... Only the BSD parts of Pd are included in RjDj at the moment, so you cannot use expr - which is tricky, as in fact there are several math functions missing now in RjDj's Pd, for example no [pow~] yet - but this will come as a builtin as soon as RjDj jumps to 0.42. Ciao -- Frank ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN pure-pd
Frank Barknecht wrote: Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote: Damian Stewart wrote: is there a pure Pd way to remove NaNs? i can't use expr with rjdj.. i thought expr is part of the RjDj distro... Only the BSD parts of Pd are included in RjDj at the moment, so you cannot use expr - which is tricky, as in fact there are several math functions missing now in RjDj's Pd, for example no [pow~] yet - but this will come as a builtin as soon as RjDj jumps to 0.42. and judging from the lack of replies i assume detecting NaNs is one of these things as well... -- damian stewart | skype: damiansnz | [EMAIL PROTECTED] frey | live art with machines | http://www.frey.co.nz ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN pure-pd
Damian Stewart wrote: Frank Barknecht wrote: Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote: Damian Stewart wrote: is there a pure Pd way to remove NaNs? i can't use expr with rjdj.. i thought expr is part of the RjDj distro... Only the BSD parts of Pd are included in RjDj at the moment, so you cannot use expr - which is tricky, as in fact there are several math functions missing now in RjDj's Pd, for example no [pow~] yet - but this will come as a builtin as soon as RjDj jumps to 0.42. and judging from the lack of replies i assume detecting NaNs is one of these things as well... Adding this functionality would be trivial, if you want you can add a ticket on track regarding the issue. In the long run the correct solution would be to try to figure out why there are NaN's ... and fix it there. Günter ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN pure-pd
On Wed, 29 Oct 2008 17:55:00 +0100 Gunter Geiger [EMAIL PROTECTED] wrote: Only the BSD parts of Pd are included in RjDj at the moment, so you cannot use expr - which is tricky, as in fact there are several math functions missing now in RjDj's Pd, for example no [pow~] yet - but this will come as a builtin as soon as RjDj jumps to 0.42. Just a quick but important note: Please make sure [pow~] is compatible with latest vanilla versions and not the broken (reversed parameter) version from cyclone. cheers, Andy -- Use the source ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN pure-pd
On Wed, Oct 29, 2008 at 11:55 AM, Gunter Geiger [EMAIL PROTECTED] wrote: Adding this functionality would be trivial, if you want you can add a ticket on track regarding the issue. In the long run the correct solution would be to try to figure out why there are NaN's ... and fix it there. Günter My best guess is that NaN's come from underflow, under normal circumstances. I wish there would be an easy way to change this behavior via a compiler flag, but I don't think there is. It seems to be a more pervasive problem, and it's unreasonable to expect to add NaN handlers in application code. Thank the IEEE standards for this gem. Chuck ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN pure-pd
My best guess is that NaN's come from underflow, under normal circumstances. I wish there would be an easy way to change this behavior via a compiler flag, but I don't think there is. It seems to be a more pervasive problem, and it's unreasonable to expect to add NaN handlers in application code. Thank the IEEE standards for this gem. I did some more searching around to find that someone has written just such a handler for underflow here: http://www.cenapad.unicamp.br/parque/manuais/Ibmcxx/complink/tasks/tutrapex.htm The code uses the sigcontext struct when a floating point exception occurs, to set the result to zero, once an underflow is created. Underflow traps are enabled by (gcc) compiler flag -mfp-trap-mode=u I'm really not sure about how all of this can be applied successfully. Has anyone implemented this kind of handler before? ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN pure-pd
Charles Henry wrote: My best guess is that NaN's come from underflow, under normal circumstances. I wish there would be an easy way to change this behavior via a compiler flag, but I don't think there is. It seems to be a more pervasive problem, and it's unreasonable to expect to add NaN handlers in application code. Thank the IEEE standards for this gem. I did some more searching around to find that someone has written just such a handler for underflow here: http://www.cenapad.unicamp.br/parque/manuais/Ibmcxx/complink/tasks/tutrapex.htm The code uses the sigcontext struct when a floating point exception occurs, to set the result to zero, once an underflow is created. Underflow traps are enabled by (gcc) compiler flag -mfp-trap-mode=u I'm really not sure about how all of this can be applied successfully. Has anyone implemented this kind of handler before? In the perform routine of sqosc~, I used: if (finite(sample))*out++ = sample; else *out++ = 0.0; to get rid of denormals. For MSW builds that required adding: #include float.h /* for _finite */ #define finite _finite Seems like the simplest solution to me... Martin ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN pure-pd
is there a pure Pd way to remove NaNs? i can't use expr with rjdj.. d -- damian stewart | skype: damiansnz | [EMAIL PROTECTED] frey | live art with machines | http://www.frey.co.nz ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN
David Brynjar Franzson wrote: the expr works fine with expr (isnan($f1), 0, $f1). The route f method doesn't work since NaN is treated as a valid floating point number. on pd-0.40-3-extended (osx intel) trying to use this i get : expr: syntax error: illegal comma , 0 , $f1 error: expr: syntax error expr (isnan($f1) , 0 , $f1) ... couldn't create -- damian stewart | skype: damiansnz | [EMAIL PROTECTED] frey | live art with machines | http://www.frey.co.nz ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN
Damian Stewart wrote: David Brynjar Franzson wrote: the expr works fine with expr (isnan($f1), 0, $f1). The route f method doesn't work since NaN is treated as a valid floating point number. on pd-0.40-3-extended (osx intel) trying to use this i get : expr: syntax error: illegal comma ... which is because it needs to be expr ( if(isnan($f1), 0, $f1) ) -- damian stewart | skype: damiansnz | [EMAIL PROTECTED] frey | live art with machines | http://www.frey.co.nz ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] removing NaN
Hi, is there any simple way to replace all NaN values with Zeros or to filter them out? thanks, David Brynjar ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN
David Brynjar Franzson wrote: Hi, is there any simple way to replace all NaN values with Zeros or to filter them out? If you do not have lists, then route should do the trick: [route f] | | | [0( cu Thomas -- Prisons are needed only to provide the illusion that courts and police are effective. They're a kind of job insurance. (Leto II. in: Frank Herbert, God Emperor of Dune) http://thomas.dergrossebruder.org/ ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN
[expr] contains a function 'isnan'. Not sure how to use it though. can someone give an example ? Tim ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] removing NaN
the expr works fine with expr (isnan($f1), 0, $f1). The route f method doesn't work since NaN is treated as a valid floating point number. thanks for the help, David Brynjar On Sat, Sep 13, 2008 at 11:05 AM, tim [EMAIL PROTECTED] wrote: [expr] contains a function 'isnan'. Not sure how to use it though. can someone give an example ? Tim On Sat, 2008-09-13 at 10:36 -0400, David Brynjar Franzson wrote: Hi, is there any simple way to replace all NaN values with Zeros or to filter them out? thanks, David Brynjar ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list -- ... www.timvets.net [EMAIL PROTECTED], [EMAIL PROTECTED] 0032 474 89 66 86 skype: tim167_ ... ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list