MCPcopy Create free account
hub / github.com/RustPython/RustPython / asin

Function asin

crates/stdlib/src/math.rs:199–208  ·  view source on GitHub ↗
(x: ArgIntoFloat, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

197
198 #[pyfunction]
199 fn asin(x: ArgIntoFloat, vm: &VirtualMachine) -> PyResult<f64> {
200 let val = x.into_float();
201 pymath::math::asin(val).map_err(|err| match err {
202 pymath::Error::EDOM => vm.new_value_error(format!(
203 "expected a number in range from -1 up to 1, got {}",
204 float_repr(val)
205 )),
206 _ => pymath_exception(err, vm),
207 })
208 }
209
210 #[pyfunction]
211 fn atan(x: ArgIntoFloat, vm: &VirtualMachine) -> PyResult<f64> {

Callers 1

cosine_kernelFunction · 0.90

Calls 2

pymath_exceptionFunction · 0.85
into_floatMethod · 0.80

Tested by

no test coverage detected