LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NaNs

Hello,

 

CVI now partially supports C99 and NaNs. According to the GNU C library (Link) basic operations and math functions all accept infinity and NaN.

 

At first glance I would expect that 'accept' means throwing no error. This is true, for example for cos ( NAN ) which yields NaN without an error.

 

Using sqrt ( NAN ) or log ( NAN ) however results in a domain error. Is this to be expected? Then, what is the difference between a quiet NAN and a signalling FP_NAN? log ( FP_NAN ) yields no error but gives 0.6931, i.e. ln ( 2 )... A quiet NaN throws an error and is not quite, while a signalling FP_NAN is quite and yields a numeric result?

 

Some explanation would be most welcome!

 

Thanks,

 

Wolfgang

 

0 Kudos
Message 1 of 1
(2,698 Views)