fix(tests): compare the Bessel exports with fixed reference values #7524
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7524"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-18T12:05:10Z.
What
#7354 added
j0f,jnfandynfchecks toGuestMath.cppthat compare againststd::cyl_bessel_jandstd::cyl_neumann. libc++ does not implement the C++17 special math functions, so the test no longer compiles on macOS (no member named 'cyl_bessel_j' in namespace 'std', lines 840, 841 and 843). The three checks now compare against fixed values of J0(2.5), J3(4.0) and Y2(3.0). The tolerance (1e-6f) and the inputs are unchanged.Reference values, as printed by the host
j0/jn/yn:Part of getting
mainto build on macOS in small pieces, as discussed in #1. It is the only error left in a survey build ofmainwith @mugurc's macOS series on top; nothing in that series or in the open macOS PRs touches these lines.Tested
macOS 27.2 on an Apple M2 Max, Xcode 27 (Apple clang 21.0.0, libc++), x86-64 full build configured as
docs/dev/BUILD.mddescribes (-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON). The full build on macOS is x86-64 only (CMakeLists.txtstops an arm64 configure), so there is no native arm64 run.main3e3e8b905:GuestMath.cpp.ofails with the three errors above.GuestMath.cpp.ocompiles.Not run:
guest_mathitself. It links againstlibc, which does not build onmainon macOS yet. On a local tree with @mugurc's series it links but aborts at thestrtolerrno check that #6853 covers; with #6853 on top it still aborts, at a check I have not located yet, so the three changed checks have not run on macOS.Linux x86-64 (Ubuntu 26.04, GCC 15.2, libstdc++), same configure, this branch merged on
main0d078f75d,guest_math_teststarget:ctest -R guest_mathpasses, as it does with themainversion ofGuestMath.cpp.guest_mathabort, so the changed checks do run.std::cyl_bessel_j(0, 2.5),std::cyl_bessel_j(3, 4.0)andstd::cyl_neumann(2, 3.0)differ from the constants by at most 6e-17 and round to the samefloat.ctest -R conventions_: 21/21.Not tested: Windows build.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T12:36:34Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/tests/GuestMath.cppcore/libs/tests/GuestMath.cppImported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T17:10:40Z.
Windows build and run, since the description lists the Windows build as not tested. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON. Build:main6efb7261bwith #7524, #7006, #6612, #6929, #7119, #6896 and #6856 merged together (each merge clean, built once).The build is clean and
guest_mathpasses 3 runs of 3.AI-assisted
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-19T18:36:25Z.
Rebased onto
main(f8545e961e) after #7906 conflicted on the same lines. The resolution keeps #7906's newynf(2, 0) == -infcheck and swaps only thestd::cyl_neumann(2.0, 3.0)reference for the fixed value, so the test no longer callsstd::cyl_*anywhere.Rebuilt
guest_math_testson Linux (x86-64) and ranctest -R '^guest_math$': passes.Written with AI assistance (Claude Code).
I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T15:16:55Z.
Checked the three constants (J0(2.5), J3(4.0), Y2(3.0)) against reference values on current main, all agree to well below the 1e-6f tolerance; inputs and tolerance unchanged, no
std::cyl_*left in the test. Windows run by @LeandroLP23 passes; merged.