CUDA Math Library- Possible Overflow Exceptions?

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 overflow errors, where the C versions identify the overflow exception, but the CUDA versions output inf values.

We understand that CUDA lacks floating-point exception detection mechanisms. However, we want to verify if these are actually overflow errors. Below are the functions and the inputs we used to identify the errors:

  1. Cosh - input: 36864.0; C result: overflow exception; CUDA result: inf
  2. Exp - input: 1073741824.0; C result: Overflow exception; CUDA result: inf
  3. Exp10 - input: 8054607360.0; C result: Overflow exception; CUDA result: inf
  4. Exp2 - input: 1088.12109375; C result: Overflow exception; CUDA result: inf
  5. expm1 - input: 32774.0; C result: Overflow exception; CUDA result: inf
  6. Lgamma - input -1073741632.0; C result: Overflow exception; CUDA result: inf
  7. Tgamma - input: 511.9921569824219; C result: Overflow exception; CUDA result: inf

I suggest providing a simple test case, like I have done here.

Hi! Robert,
I have provided a test case here,

I’ve provided a response there. CUDA device code doesn’t throw exceptions of any kind.

Thank you for the response. We want to confirm such situations we identified during our investigation. Much appreciated