(x: ArgIntoFloat, vm: &VirtualMachine)
| 257 | |
| 258 | #[pyfunction] |
| 259 | fn tan(x: ArgIntoFloat, vm: &VirtualMachine) -> PyResult<f64> { |
| 260 | let val = x.into_float(); |
| 261 | pymath::math::tan(val).map_err(|err| match err { |
| 262 | pymath::Error::EDOM => { |
| 263 | vm.new_value_error(format!("expected a finite input, got {}", float_repr(val))) |
| 264 | } |
| 265 | _ => pymath_exception(err, vm), |
| 266 | }) |
| 267 | } |
| 268 | |
| 269 | #[pyfunction] |
| 270 | fn degrees(x: ArgIntoFloat) -> f64 { |
no test coverage detected