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

Function log

crates/stdlib/src/cmath.rs:91–101  ·  view source on GitHub ↗
(
        z: ArgIntoComplex,
        base: OptionalArg<ArgIntoComplex>,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

89
90 #[pyfunction]
91 fn log(
92 z: ArgIntoComplex,
93 base: OptionalArg<ArgIntoComplex>,
94 vm: &VirtualMachine,
95 ) -> PyResult<Complex64> {
96 pymath::cmath::log(
97 z.into_complex(),
98 base.into_option().map(|b| b.into_complex()),
99 )
100 .map_err(|err| pymath_exception(err, vm))
101 }
102
103 #[pyfunction]
104 fn log10(z: ArgIntoComplex, vm: &VirtualMachine) -> PyResult<Complex64> {

Callers

nothing calls this directly

Calls 4

pymath_exceptionFunction · 0.85
into_complexMethod · 0.80
into_optionMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected