Thread Links | Date Links | ||||
---|---|---|---|---|---|
Thread Prev | Thread Next | Thread Index | Date Prev | Date Next | Date Index |
David et al, On 09/06/2013 01:30 AM, David Lester wrote:
Given a two vectors A,B of length n , will there be a difference in any bit in the answer between double_correctly_rounded_dot_product(A,B,n) and reduce_to_double(exact_dot_product(A,B,n))? yes or no? Yes. Suppose A, and B are of dimension 3, with a_1*b_1 = 10e350, a_2*b_2 = -10e350, and a_3*b_3 = 1e-350. (Substitute an alternative to 350 in the above if I've got the wrong exponent.) The exact dot product will get 1e-350. Depending on how it's implemented double_correctly_rounded_dot_product might get any number of answers, but 0 is quite likely --- even if quad precision is used internally.
That is where I am confused. I thought that by "correctly rounded", we meant
"as if the exact answer were first computed, then rounded." If that's our definition (which was my understanding of the definition in 754 of a correctly rounded function value), there would be no difference in the results stored in a floating point double. Am I being naive about the specifications of unnormalized numbers and gradual underflow? Baker -- --------------------------------------------------------------- R. Baker Kearfott, rbk@xxxxxxxxxxxxx (337) 482-5346 (fax) (337) 482-5270 (work) (337) 993-1827 (home) URL: http://interval.louisiana.edu/kearfott.html Department of Mathematics, University of Louisiana at Lafayette (Room 217 Maxim D. Doucet Hall, 1403 Johnston Street) Box 4-1010, Lafayette, LA 70504-1010, USA ---------------------------------------------------------------