>> It would be great if someone could let me know why this happens. > > They don't use the same implementation, so such tiny differences are > expected - having exactly the same solution would have been surprising, > actually. You may be surprised about the difference for such a trivial > operation, but keep in mind that dot is implemented with highly > optimized CPU instructions (that is if you use ATLAS or similar library).
Also, IIRC, 1.0 cannot be represented exactly as a float, so the dot way may be more wrong than the sum way. Matthieu -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
