MCPcopy Index your code
hub / github.com/RustPython/RustPython / copysign

Function copysign

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

Source from the content-addressed store, hash-verified

70
71 #[pyfunction]
72 fn copysign(x: ArgIntoFloat, y: ArgIntoFloat, vm: &VirtualMachine) -> PyResult<f64> {
73 pymath::math::copysign(x.into_float(), y.into_float())
74 .map_err(|err| pymath_exception(err, vm))
75 }
76
77 // Power and logarithmic functions:
78 #[pyfunction]

Callers 5

test_inf_signsMethod · 0.90
test_nan_signsMethod · 0.90

Calls 2

pymath_exceptionFunction · 0.85
into_floatMethod · 0.80

Tested by 5

test_inf_signsMethod · 0.72
test_nan_signsMethod · 0.72