Hello!
We are currently using the CUDA Math Library to experiment with the numerical stability of its Math APIs. To verify correctness, we compare CUDA Math APIs with the corresponding C programming math functions. We have encountered some issues, particularly with underflow errors, where the C versions identify the underflow exception, but the CUDA versions output -inf/0.0 values.
We understand that CUDA lacks floating-point exception detection mechanisms. However, we want to verify if these are actually underflow errors. Below are the functions and the inputs we used to identify the errors:
- asin- input: 1.4693679385278594e-39; C result: Underflow exception; CUDA result: -inf
- erf - input: -1.0101903176080569e-38; C result: Underflow exception; CUDA result: -inf
- erfc- input: 450.4062194824219; C result: Underflow exception; CUDA result: 0.0
- exp- input: -1099461492736.0; C result: Underflow exception; CUDA result: 0.0
- exp10- input: -63.3827476501; C result: Underflow exception; CUDA result: 0.0
- exp2- input: -7316.86279; C result: Underflow exception; CUDA result: 0.0
- tgamma- input- -128.25; C result: Underflow exception; CUDA result: 0.0