03-19-2018 11:33 AM
I was surprised to observe that Max/Min functions will ignore NaN values inside an array.
Except if the first element is NaN, in this case the function will return NaN no matter what the rest of elements are real values.
Is it the expected behavior? To me it seems like a bug.
I'm using Teststand 2014.
Cheers,
03-20-2018 12:54 AM
I think this can be expected. IEEE754 standard defines that any comparison with NaN except != returns false. And the Max (Array) function does probably something like
Max = Array[0];
for (i= 1; i< Lenght(Array); i++)
if (Array[i] > Max)
Max = Array[i] ;
This will give you the observed result.