Originariamente inviato da peruzzo
codice:
import static java.lang.Math.*;

class Esempio {
	public static void main(String args[]) {
		double x;
		x = ulp(12.50);
		System.out.println(x);
	}

}
1.7763568394002505E-15

sul manuale c'è scritto che 1.7763568394002505E-15 è l'unità nell'ultima posizione... ma che roba è!?!?!
Ancora, c'è la documentazione oracle che mi pare piuttosto chiara:


Returns the size of an ulp of the argument. An ulp of a double value is the positive distance between this floating-point value and the double value next larger in magnitude. Note that for non-NaN x, ulp(-x) == ulp(x).


Cosa non capisci di preciso?