Upgrade pymath to 0.2.0 (#7429)

This commit is contained in:
Jeong, YunWon
2026-03-14 20:13:30 +09:00
committed by GitHub
parent 430eb5ffe4
commit 40fc7c210d
3 changed files with 5 additions and 4 deletions

4
Cargo.lock generated
View File

@@ -2550,9 +2550,9 @@ dependencies = [
[[package]]
name = "pymath"
version = "0.1.5"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbfb6723b732fc7f0b29a0ee7150c7f70f947bf467b8c3e82530b13589a78b4c"
checksum = "bc10e50b7a1f2cc3887e983721cb51fc7574be0066c84bff3ef9e5c096e8d6d5"
dependencies = [
"libc",
"libm",

View File

@@ -200,7 +200,7 @@ optional = "0.5"
parking_lot = "0.12.3"
paste = "1.0.15"
proc-macro2 = "1.0.105"
pymath = { version = "0.1.5", features = ["mul_add", "malachite-bigint", "complex"] }
pymath = { version = "0.2.0", features = ["mul_add", "malachite-bigint", "complex"] }
quote = "1.0.45"
radium = "1.1.1"
rand = "0.9"

View File

@@ -712,7 +712,8 @@ mod math {
}
// Finalize float path
if !flt_p_values.is_empty() {
let flt_result = pymath::math::sumprod(&flt_p_values, &flt_q_values);
let flt_result = pymath::math::sumprod(&flt_p_values, &flt_q_values)
.map_err(|err| pymath_exception(err, vm))?;
let flt_obj: PyObjectRef = vm.ctx.new_float(flt_result).into();
obj_total = Some(match obj_total {
Some(total) => vm._add(&total, &flt_obj)?,