Wie werden in Java irrationale Zahlen behandelt?

Irrationale Zahlen werden genauso wie rationale Zahlen in Java mit einer endlichen Anzahl von Stellen als Fließpunktzahlen dargestellt.

Beispiel:
In der Klasse Math werden die irrationalen Zahlen \(e\) und \(\Pi\) folgendermaßen dargestellt:

    /**
     * The {@code double} value that is closer than any other to
     * <i>e</i>, the base of the natural logarithms.
     */
    public static final double E = 2.7182818284590452354;

    /**
     * The {@code double} value that is closer than any other to
     * <i>pi</i>, the ratio of the circumference of a circle to its
     * diameter.
     */
    public static final double PI = 3.14159265358979323846;