Skip to content

Add approx_rational for rational approximations of Computables#11

Open
TimTheBig wants to merge 4 commits into
timschmidt:mainfrom
TimTheBig:approx_rational
Open

Add approx_rational for rational approximations of Computables#11
TimTheBig wants to merge 4 commits into
timschmidt:mainfrom
TimTheBig:approx_rational

Conversation

@TimTheBig
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the approx_rational method to Computable in src/computable/node.rs, which provides a dyadic rational approximation within a specified precision. It includes a fast-path optimization for exact-rational leaves with power-of-two denominators and adds comprehensive unit tests. The feedback suggests simplifying the fast-path check by reusing the existing dyadic_denominator_shift method on Rational to improve code maintainability.

Comment thread src/computable/node.rs Outdated
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