8000 Updating test_math.py to CPython 3.12.9 by hbina · Pull Request #5507 · RustPython/RustPython · GitHub
[go: up one dir, main page]

Skip to content

Updating test_math.py to CPython 3.12.9 #5507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 20, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
follow CPython error message
  • Loading branch information
youknowone committed Feb 20, 2025
commit 6d3960bb8ca9bd0bfd66d8636d5624220b47351a
4 changes: 2 additions & 2 deletions vm/src/builtins/float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ fn inner_divmod(v1: f64, v2: f64, vm: &VirtualMachine) -> PyResult<(f64, f64)> {

pub fn float_pow(v1: f64, v2: f64, vm: &VirtualMachine) -> PyResult {
if v1.is_zero() && v2.is_sign_negative() {
let msg = format!("{v1:?} cannot be raised to a negative power");
Err(vm.new_zero_division_error(msg))
let msg = "0.0 cannot be raised to a negative power";
Err(vm.new_zero_division_error(msg.to_owned()))
} else if v1.is_sign_negative() && (v2.floor() - v2).abs() > f64::EPSILON {
let v1 = Complex64::new(v1, 0.);
let v2 = Complex64::new(v2, 0.);
Expand Down
Loading
0