cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Translate the entire conversation x

NaN not always working as expected in Prime 3.0

FredLusk
14-Alexandrite

NaN not always working as expected in Prime 3.0

I am developing a worksheet that performs a series of simple mathematical operations on an array of data. Sometimes there will be missing data, so I am using NaN for those cases. Most of these operations work just fine, returning NaN for any result based on NaN as an input. However, my worksheet tells me that asin(NaN) = 0, which I did not expect.

So, I decided to try NaN with more functions. Most behaved as expected, but several did not, as shown in the attached worksheet. Some are obvious bugs (e.g. asin, acos, log, etc.), but other may just be inconsistent handling of incorrect data (compare gcd and mod).

Please look this over and give me your opinions as well as provide other examples that I did not test. PTC, please look this over and incorporate the needed fixes for the next release. Thanks.

0 REPLIES 0
Announcements

Top Tags