[PD] removing NaN pure-pd
czhenry at gmail.com
Wed Oct 29 19:44:18 CET 2008
> 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:
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?
More information about the Pd-list