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

Function pymath_exception

crates/stdlib/src/math.rs:935–940  ·  view source on GitHub ↗
(err: pymath::Error, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

933}
934
935pub(crate) fn pymath_exception(err: pymath::Error, vm: &VirtualMachine) -> PyBaseExceptionRef {
936 match err {
937 pymath::Error::EDOM => vm.new_value_error("math domain error"),
938 pymath::Error::ERANGE => vm.new_overflow_error("math range error"),
939 }
940}
941
942/// Format a float in Python style (ensures trailing .0 for integers).
943fn float_repr(value: f64) -> String {

Callers 15

phaseFunction · 0.85
polarFunction · 0.85
rectFunction · 0.85
expFunction · 0.85
sqrtFunction · 0.85
sinFunction · 0.85
asinFunction · 0.85
cosFunction · 0.85
acosFunction · 0.85
logFunction · 0.85
log10Function · 0.85
acoshFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected