acos (Math.sin (y1) * Math.sin (y2)
+ Math.cos (y1) * Math.cos (y2) * Math.cos (x1-x2)));
document.write ("<P><STRONG>First computation:</STRONG> dist =
" + dist);
// Second computation (does not evaluate correctly)
dist = (Math.acos (Math.sin (y1) * Math.sin (y2)
+ Math.cos (y1) * Math.cos (y2) * Math.cos (x1-x2))) * R;
document.write ("<P><STRONG>Second computation:</STRONG> dist
= " + dist);
// -->
</SCRIPT>
Results
The results of the script appear below (provided you have JavaScript
enabled). The numbers should be the same, but in Opera 3.0, they are
different (the second result is incorrect).
Discovered By
|