Skip to content

remove unnecessary var from numerator and denominator in geometic equation and tidy up /algorithm code#281

Open
albertstill wants to merge 4 commits into
airbnb:masterfrom
albertstill:master
Open

remove unnecessary var from numerator and denominator in geometic equation and tidy up /algorithm code#281
albertstill wants to merge 4 commits into
airbnb:masterfrom
albertstill:master

Conversation

@albertstill
Copy link
Copy Markdown
Contributor

There is an unnecessary var being used in the geometric equation, I've removed it and tidied up the code. Note there are tests to cover the geometric equation, them passing helps prove it's the same equation with this var removed.

Here is some handwritten maths explaining why the max need not live at the top and bottom of the fraction, it just cancels out. I start with what we used to have and finish with what this PR changes to.

IMG_20200521_171308

Copy link
Copy Markdown
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Seems reasonable

@albertstill
Copy link
Copy Markdown
Contributor Author

Can we merge this now?

@albertstill
Copy link
Copy Markdown
Contributor Author

What about now?

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