|
[Blackmax] BlackMax bugIan Preston ianopolous at gmail.comWed Sep 8 12:31:18 BST 2010
Hi guys, I thought I'd tell you I found a pretty serious bug in the blackmax code whilst converting it to Java. The decision whether to emit another particle via hawking radiation or not compares two mass values which are double precision floating point numbers. However most of the time for the last decay these are identical up the accuracy of a float. However after the subtraction spurious digits are obtained and thus the choice to decay is essentially random. The way to handle this is not to test if Ma > Mb, but to test if Ma-Mb > epsilon. Where epsilon is the smallest digit of precision representable with a double precision float (2-53 off the top of my head). I suspect there are other places where branching on the comparison of two floats could cause problems as well. cheers, Ian -- JPC Lead Developer Oxford University http://jpc.sourceforge.net/ http://www-nereus.physics.ox.ac.uk/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.hepforge.org/lists-archive/blackmax/attachments/20100908/33e6436b/attachment.htm
More information about the Blackmax mailing list |