NaN * 0 = 0

Post here if you have a question about LAPACK or ScaLAPACK algorithm or data format

NaN * 0 = 0

Postby fkluknav » Tue Feb 04, 2014 11:12 am

Hello,

dgemm and many other functions assume 0 * anything = 0. They explicitly check for 0 and skip computations in that case. The obvious benefit is speed. The downside is when the matrix contains a NaN, this NaN is hidden and ignored. IEEE 754 says 0 * NaN = NaN. Some mathematical programs refuse to compile and install when they discover this during self-tests.
Does LAPACK strive for IEEE 754 compliance? Is this a bug or a feature?

Thanks.
fkluknav
 
Posts: 3
Joined: Tue Feb 04, 2014 10:42 am

Return to Algorithm / Data

Who is online

Users browsing this forum: No registered users and 2 guests