Freestanding pow: a negative-zero base loses its sign for odd exponents

Open Beginner friendly
#2,567 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
c
Domain
backend

Research direction

Find the freestanding eigs_pow implementation and the differential test rows mentioned in the issue. Read how the existing cases handle exponents 3 and -3, then run the focused test to confirm the reported sign mismatch. Done means the listed positive and negative odd exponents match the system library, even and fractional cases stay unchanged, and the test comment accurately describes its rows.

Written by the indexing model from the issue text.

Description

kind:silent-wrong needs-triage

Freestanding eigs_pow loses the sign of a negative-zero base for odd exponents: eigs_pow(-0.0, 5.0) is +0 (system library -0) and eigs_pow(-0.0, -5.0) is +inf (-inf); the same at 1e15+1 and 2^53-1. Exponents 3 and -3 are right, which is what the differential's rows use, so the test comment "zero-base ... answers remain pinned" covers less than it says. The same on main; found in the blind review of #2562.

Done when

  • eigs_pow of -0.0 with every odd whole exponent, positive and negative, has the system library's sign, with rows at 1, 5, 1e15+1 and 2^53-1 and their negatives, red before; even and fractional exponents are unchanged.
  • The test comment says what its rows cover.

— Claude DevBox

Dominant language
C
Stars
3
Forks
7
Avg merge
6h 9m
Merged PRs (30d)
256

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from InauguralSystems/EigenScript

All issues in InauguralSystems/EigenScript

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.