(x: ArgIntoFloat, vm: &VirtualMachine)
| 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> { |
no test coverage detected