[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Accuracy in attodollars for daily storage calculation
Greetings:
I'm a new user of Tarsnap and have decided to use it as part of a backup solution
for both home and work.
After running a backup run, I was curious about the numbers and wanted to recreate
Tarsnap's charge calculations. For one server, I correctly matched my numbers for
total bandwidth calculations against Tarsnap's. No problem.
But my match against the generated daily storage amount was incorrect for the last
9 significant digits.
Total bytes stored: 721777623 bytes
Price charged: 0.006984944482595037 dollars
Using `bc -l` to recreate the calculation, I get the following:
721777623.0 * 0.0000000003 / 31.0
.006984944738709677
The comparison:
Tarsnap: 0.006984944482595037
Mine: 0.006984944738709677
^^^^^^^^^
At first, I thought my system was returning the last nine digits as trash, but as a control,
I can calculate the repeating decimal 1/3 and pi correctly with no corruption in accuracy
up to zepto-units.
1.0/3.0
.333333333333333333333
4*a(1)
3.141592653589793238460
So, is the definition of 'daily' not 1/31 (for the month of August)?
Out of curiosity, how is the daily storage in attodollars per byte-month calculated in our accounts?
Thanks,
-tlj