[parsec-users] Logical error in Blackscholes benchmark

Nirav Shah nirav4ever4u at gmail.com
Sat Nov 29 12:05:41 EST 2008


Hi,

I am working on Blackscholes benchmark and I have found a potential logical
error in the code.

Following is the snippet of code from line 193 to 200 in blackscholes.c

193     xD1 = xD1 + xLogTerm;
194     xD2 = xD2 + xLogTerm;
195
196     xDen = xVolatility * xSqrtTime;
197     xD1 = xD1 / xDen;
198
199     xD2 = xD1 -  xDen;
200

It seems that the value of xD2 is overwritten without being used in line
199. It is assigned in line 194 and assigned again in line 199. Kindly
clarify whether this is an anomaly or desired.

Regards,
Nirav Shah.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20081129/f74fb948/attachment.html>


More information about the parsec-users mailing list