(x: ArgIntoFloat, vm: &VirtualMachine)
| 185 | // Trigonometric functions: |
| 186 | #[pyfunction] |
| 187 | fn acos(x: ArgIntoFloat, vm: &VirtualMachine) -> PyResult<f64> { |
| 188 | let val = x.into_float(); |
| 189 | pymath::math::acos(val).map_err(|err| match err { |
| 190 | pymath::Error::EDOM => vm.new_value_error(format!( |
| 191 | "expected a number in range from -1 up to 1, got {}", |
| 192 | float_repr(val) |
| 193 | )), |
| 194 | _ => pymath_exception(err, vm), |
| 195 | }) |
| 196 | } |
| 197 | |
| 198 | #[pyfunction] |
| 199 | fn asin(x: ArgIntoFloat, vm: &VirtualMachine) -> PyResult<f64> { |
no test coverage detected