def sqrt(x)
    return Float::NAN if x.kind_of? Float and x.nan?

    x = Rubinius::Type.coerce_to_float(x)
    raise DomainError, 'sqrt' unless x >= 0.0