static double toDouble(O o) { if (o cast Number) ret o.doubleValue(); if (o cast BigInteger) ret o.doubleValue(); if (o cast S) ret parseDouble(o); if (o == null) ret 0.0; throw fail(o); }