Skip to content

Implement division without resorting to inverse the multiplication - #28

Merged
FreeApophis merged 4 commits into
mainfrom
implement-quotient
Jun 12, 2026
Merged

Implement division without resorting to inverse the multiplication#28
FreeApophis merged 4 commits into
mainfrom
implement-quotient

Conversation

@FreeApophis

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a MoneyQuotient expression node and visitor support intended to represent division directly (rather than as multiplication by an inverse), aiming to improve numerical exactness for sequences like * 0.6666 / 0.6666.

Changes:

  • Added MoneyQuotient expression node and extended the visitor interfaces/implementations to handle it.
  • Added division support to MoneyBag to enable evaluation of quotient expressions.
  • Added a new FsCheck test and updated the README requirements list.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
README.md Adds a new TDD requirement entry describing quotient-based division motivation.
Funcky.Money/Visitors/ToHumanReadableVisitor.cs Adds human-readable formatting for MoneyQuotient.
Funcky.Money/Visitors/MoneyBag.cs Adds Divide(decimal ...) and DivideBag(...) to support quotient evaluation.
Funcky.Money/Visitors/IMoneyExpressionVisitor.cs Extends the visitor interface with Visit(MoneyQuotient ...).
Funcky.Money/Visitors/EvaluationVisitor.cs Adds evaluation support for MoneyQuotient via MoneyBag.Divide.
Funcky.Money/ExpressionNodes/MoneyQuotient.cs Introduces the new MoneyQuotient expression node.
Funcky.Money.Test/DivisionImplementationTest.cs Adds a new property-based test for multiply/divide round-tripping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread Funcky.Money/Visitors/EvaluationVisitor.cs
Comment thread Funcky.Money/Visitors/MoneyBag.cs Outdated
Comment thread Funcky.Money/Visitors/MoneyBag.cs Outdated
Comment thread Funcky.Money/ExpressionNodes/MoneyQuotient.cs Outdated
Comment thread Funcky.Money.Test/DivisionImplementationTest.cs
FreeApophis and others added 3 commits June 12, 2026 17:33
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@FreeApophis
FreeApophis merged commit dfb9893 into main Jun 12, 2026
1 check passed
@FreeApophis
FreeApophis deleted the implement-quotient branch June 12, 2026 17:55
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.

2 participants