pow~ with exponent less than 1 causes NAN bug on Powerbook G4

Dec 19, 2009 at 8:14pm

pow~ with exponent less than 1 causes NAN bug on Powerbook G4

OK, if I’m being stupid and jumping the gun, I apologise unreservedly. But I smell a rat with [phasor~]. Take a look at the following patch:

– Pasted Max Patch, click to expand. –

chris

#47306
Dec 19, 2009 at 8:28pm

I observe the same problem with [saw~], [tri~] and [rect~]. Maybe it’s my patching, but I can’t for the life of me see what I’m doing wrong.

#170203
Dec 19, 2009 at 8:29pm

I can’t reproduce that on my laptop. Phasor~ works fine for me in that patch

#170204
Dec 19, 2009 at 8:32pm

Powerbook G4, OS 10.5.8, Max 5.1.0.

I’ll download the latest version and see if it’s still an issue.

Interestingly, if I stick a [snapshot~ 10] -> [flonum] -> [sig~] in front of the [phasor~] it retriggers OK.

Thanks for checking it out though.

chris

#170205
Dec 19, 2009 at 8:35pm

Are you getting any errors posted to the max window?

#170206
Dec 19, 2009 at 8:36pm

Nope. :(

#170207
Dec 19, 2009 at 8:46pm

AHA! I think it’s something to do with my Powerbook’s floating point unit. I hooked a [snapshot~ 10] -> [flonum] to [phasor~]‘s output and it shows NAN. Sheeeeeeeeeeeit.

Any ideas on how to get around this? I think it must be something to do with [pow~] and my FPU…

Yes, that’s exactly what it is. [pow~] with an exponent < 1 causes the NAN issue. Hrmph.

So, does anyone know of a better way to generate a reverse log curve from a [click~]?

#170208
Dec 19, 2009 at 9:10pm

Never mind, discovered [bitsafe] and fixed it. :D

I suppose [pow~] was generating infinity and while [cycle~], [snapshot~] and [flonum] could all handle it, none of the anti-aliased oscillators could.

FWIW, thanks for your time, Tim.

chris

#170209

You must be logged in to reply to this topic.