Skip to content

Add deterministic divisor oracle for #54 - #57

Draft
isomorphisms wants to merge 4 commits into
mainfrom
fix/issue-54-deterministic-divisor-oracle
Draft

isomorphisms wants to merge 4 commits into
mainfrom
fix/issue-54-deterministic-divisor-oracle

Conversation

@isomorphisms

Copy link
Copy Markdown
Collaborator

Refs #54.

This deliberately starts from main, not experiment/powervr-phone-fastpath.

Oracle

Adds a host-side mathematical oracle under _/oracle/ and runs it in the normal test workflow. The acceptance sequence is:

  1. one stationary pole plus one exactly coincident zero reduces algebraically to the empty divisor, including at the removable point;
  2. a slightly displaced pair agrees with the direct complex ratio and is not simplified away;
  3. 24 exact pairs reduce to the empty divisor, while 24 displaced pairs agree with a direct ratio product;
  4. moving wandering poles and physical-GPU optimization remain later acceptance boundaries.

Failures isolated

The tests keep two recent evaluator strategies only as negative controls, not as architecture:

  • divisor-first fp32 accumulation followed by a large q can erase a real displaced-pair contribution;
  • the raw collapsed fp32 product of 24 pole factors can overflow before phase/log-modulus extraction.

There is also a more basic semantic boundary: exact cancellation has to happen before numeric evaluation. Leaving the pair in separate atan/log paths makes the removable point reach atan(0,0), whose GLSL result is undefined.

The oracle therefore does not preserve the recent raw/scaled product helpers, marker-culling work, or their structural green tests as constraints. It defines the mathematical behavior a replacement live evaluator must match.

Verification

python -m unittest discover -s _/oracle -p 'test_*.py' -v passes 7/7 locally.

This PR is intentionally draft: it establishes the deterministic oracle and failure ordering first. It does not claim live GLSL parity or physical PowerVR acceptance yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant