fn math_ceil(value: PyObjectRef, vm: &VirtualMachine) -> PyResult {
    if objtype::isinstance(&value, &vm.ctx.float_type()) {
        let v = objfloat::get_value(&value);
        let v = objfloat::try_bigint(v.ceil(), vm)?;
        Ok(vm.ctx.new_int(v))
    } else {
        try_magic_method("__ceil__", vm, &value)
    }
}
/// Applies ceiling to a float, returning an Integral.
///
/// # Arguments
///
/// * `value` - Either a float or a python object which implements __ceil__
/// * `vm` - Represents the python state.
Applies ceiling to a float, returning an Integral.
Applies ceiling to a float returning an Integral .
fn math_ceil(value: PyObjectRef, vm: &VirtualMachine) -> PyResult {
    if objtype::isinstance(&value, &vm.ctx.float_type()) {
        let v = objfloat::get_value(&value);
        let v = objfloat::try_bigint(v.ceil(), vm)?;
        Ok(vm.ctx.new_int(v))
    } else {
        try_magic_method("__ceil__", vm, &value)
    }
}
fn math_ceil ( value : PyObjectRef , vm : & VirtualMachine ) -> PyResult { if objtype :: isinstance ( & value , & vm . ctx . float_type ( ) ) { let v = objfloat :: get_value ( & value ) ; let v = objfloat :: try_bigint ( v . ceil ( ) , vm ) ? ; Ok ( vm . ctx . new_int ( v ) ) } else { try_magic_method ( " " , vm , & value ) } }
Applies ceiling to a float, returning an Integral.
Applies ceiling to a float returning an Integral .
value
PyObjectRef
vm
&VirtualMachine
value
PyObjectRef
vm
&VirtualMachine