* Adopt pymath remainder fix on Windows
Pin pymath to the merged CPython-compatible remainder implementation and remove the passing Windows expected-failure marker.
Investigation, implementation, and validation assisted by Codex.
Assisted-by: Codex:GPT-5
* Keep deferred object deallocation iterative
Run deferred deallocators inside a guarded trashcan context so their end calls cannot recursively drain the same queue. Reset the depth on unwind and test the drain invariant. Fixes stack overflow while dropping deeply nested Element trees on Windows.
Investigation, implementation, validation, and focused review assisted by Codex.
Assisted-by: Codex:GPT-5
* Fix 32-bit sequence hashes, repetition errors, and range state
Use the declared 64-bit hash width for tuple hashing on every target, raise MemoryError for oversized sequence allocations, and preserve arbitrary-precision positions in long range iterators. Keep exhausted iterators exhausted instead of wrapping their counters.
Add Rust regression tests and verify the canonical Python suites with an optimized Windows x86 interpreter. Implementation, investigation, validation, and focused review assisted by Codex.
Assisted-by: Codex:GPT-5
* Add Python 3.15 math APIs using pymath
Pin pymath to merged dd1e9a4cf26d68caf3b549c09476f52e356e16a3
and expose isnormal, issubnormal, signbit, fmax and fmin through thin
wrappers. Share the existing integer functions through math.integer
and _math_integer, matching CPython module identity and metadata.
Migrate test_math.py and test_math_integer.py via scripts/update_lib
from CPython d220409a13b77de7a6c30abe16ea90db01528edc, preserving the
existing Windows remainder marker. Add bounded Python snippet coverage.
AI assistance: OpenAI Codex implemented and source-reviewed this change,
ran update_lib, and performed focused automated validation. No human
manual testing is claimed.
Assisted-by: OpenAI Codex:model version unavailable
* Track integer math tests in library updates
Assisted-by: OpenAI Codex:model version unavailable
* Fix ldexp to prevent math range errors
Implemented IEEE 754-compliant handling for large numbers to avoid
overflow and represent results using scientific notation.
Fixes#5471
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
* Fix ldexp to handle denormalized inputs correctly
Detect denormalized input values below f64::MIN_POSITIVE
Scale subnormal inputs by 2^54 to bring them into normalized range
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
* tests(math): remove expectedFailure from testLdexp_denormal
As now we have implemented IEEE 754 format , so this will pass.
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
* Update Lib/test/test_math.py
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
* fixed formate in math.rs
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
---------
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
This also fixes a bug in the log2() implementation, where very large
negative integer arguments would not raise an exception (and instead
would turn into NaNs).
add conditions for below rules
1. remainder(x, inf) is x, for non-NaN non-infinite x
2. According to IEEE 754-2008 7.2(f)
2-1. remainder(x, 0) for non-NaN x is invalid operation
2-2. remainder(infinity, x) for non-NaN x is invalid operation
add two conditions to raise ValueError for input values
case 1: NaN, when both input values are finite, and base is negative and exponent is non-integer
case 2: divde by zero, when base is 0 exponent is negative value