doubleValue

The value of a float or double, widened to Double.

Integers and decimals are deliberately not accepted: a silent widening here is how a query engine starts answering = comparisons with rounding errors. Branch on kind instead.

Throws

unless this value is a float or a double.