Here is what I see for the first two cases:
# cat t244.cu
#include <cstdio>
#include <cmath>
__host__ __device__
void comp(){
double val = 0.0001590810570633039;
printf("acos: %.15f\n", acos(val));
val = 2326705117069312.0;
printf("acosh: %.15f\n", acosh(val));
}
__global__ void k(){
comp();
}
int main(){
printf("CPU:\n");
comp();
printf("GPU:\n");
k<<<1,1>>>();
cudaDeviceSynchronize();
}
# nvcc -o t244 t244.cu
# ./t244
CPU:
acos: 1.570637245737162
acosh: 36.076376729401275
GPU:
acos: 1.570637245737162
acosh: 36.076376729401275
#
CUDA 12.2, L4 GPU, g++ 11.4
My suggestion would be for you to provide a complete test case, just as I have done, to facilitate further inspection. My guess is you are looking at float computations, not double, but I’m not sure about that. Its certainly possible for there to be differences GPU vs. CPU, and the scope of the possible error expected (vs. the “correctly-rounded result” not necessarily a CPU reference) on the GPU side is given in the programming guide.