This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ping @whit537. I don't know who else deals with PayPal right now. |
Closed
Here's why I took out the test for 0.75. |
I always try masspay.py -p, and the user is always right! :-)
I never use it. Instead let's just point to the command line switches.
Over on #1988 I've done some more thinking about how to manage our escrow across our multiple accounts. This adds a report to the masspay script to help make decisions about that.
I am unable to reproduce this result. Right now I am seeing |
No wait ... |
No, actually, yes ... ? |
Here's the Python script I was using: #!/usr/bin/env python
from decimal import Decimal as D
def round_(d):
return d.quantize(D('0.01'))
for dollars in range(25,27):
for cents in range(100):
target = D('{}.{:0>2}'.format(dollars, cents))
exact = target / D('1.02')
inexact = round_(exact)
check_exact = inexact * D('1.02')
check_rounded = round_(check_exact)
if check_rounded != target:
print target, check_rounded, check_exact, inexact, exact Here's a similar JavaScript script that @rummik came up with: |
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Should solve #2198
Edit: Please note, I don't know how to test this. I'll leave that up to @whit537