// TODO: do we need to check for NaN and infinity?
// TODO: compare to c++ implementation
// TODO: return zero when x is zero?
private static final double halfUlp (final double x) {
    // TODO: do we need to check for NaN and infinity?
    // TODO: compare to c++ implementation
    // TODO: return zero when x is zero?
    if (0.0 == x) { return 0.0; }
    return 0.5 * Math.ulp(x); }
private static final double halfUlp (final double x) {
// TODO: do we need to check for NaN and infinity?
// TODO: compare to c++ implementation
// TODO: return zero when x is zero?
if (0.0 == x) { return 0.0; }
return 0.5 * Math.ulp(x); }
private static final double halfUlp (final double x) {
// TODO: do we need to check for NaN and infinity?
// TODO: compare to c++ implementation
// TODO: return zero when x is zero?
if (0.0 == x) { return 0.0; }
return 0.5 * Math.ulp(x); }
private static final double halfUlp (final double x) {
// TODO: do we need to check for NaN and infinity?
// TODO: compare to c++ implementation
// TODO: return zero when x is zero?
if (0.0 == x) { return 0.0; }
return 0.5 * Math.ulp(x); }