Prof. Kahan came up with the notion of an ulp. An ulp of a real number value is the distance between the floatingpoint numbers which bracket the real value. Of course since the only reals we can represent happen to be floatingpoint numbers, this corresponds to the distance between adjacent floatingpoint values. To avoid ambiguities at powers of two (where the distance between numbers changes), we can define an ulp of a floatingpoint value to be the distance to the next floatingpoint value larger in magnitude.
In Java, all the arithmetic operations {+, , *, /, sqrt} have error of less than 1/2 ulp assuming their inputs are exact; i.e. assuming you want to take the square root of the floatingpoint number closest to 0.1 not 0.1 exactly. Much of the math library must be accurate to 1 ulp although a few functions only require 2 ulps. Of course even with correct rounding at each step, the final answer could be widely inaccurate due to accumulated and amplified roundoff errors.
This page is posted 
http://mindprod.com/jgloss/ulp.html  
Optional Replicator mirror

J:\mindprod\jgloss\ulp.html  
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission.  
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[54.162.15.31] 
 
Feedback 
You are visitor number  