Quantcast
Channel: PTC Community : Discussion List - PTC Mathcad
Viewing all articles
Browse latest Browse all 2936

NaN not always working as expected in Prime 3.0

$
0
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.


Viewing all articles
Browse latest Browse all 2936

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>