def is_finite(builder, val):
    """
    Return a condition testing whether *val* is a finite.
    """
    val_minus_val = builder.fsub(val, val)
    return builder.fcmp_ordered('ord', val_minus_val, val_minus_val)
