Skip to content

Commit

Permalink
Improve sqrtT assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
kchristin22 committed Nov 16, 2024
1 parent 89b7996 commit 59129ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demos/CUDA/BlackScholes/BlackScholes_kernel.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ __device__ inline void BlackScholesBodyGPU(float& CallResult, float& PutResult,
float sqrtT, expRT;
float d1, d2, CNDD1, CNDD2;

sqrtT = fdividef(1.0F, 1.0 / sqrtf(T));
sqrtT = sqrtf(T);
d1 = fdividef(logf(S / X) + (R + 0.5f * V * V) * T, V * sqrtT);
d2 = d1 - V * sqrtT;

Expand Down

0 comments on commit 59129ad

Please sign in to comment.