This is the reason that we need to work with big numbers.
Please check this my Friend:
http://pastebin.com/fhF3i6y0If you see, when you increase the number then the result will be 0 on every 26 time. This mean: 1:26 for get the result: 0 !
I have now whats wrong! When the Difficulty changes under 1 million then the success rate is absolute high.
Example when you want play with 1.1 ether and you get 118181817 Diffi, then you have 1 : 59 090 908 rate. This means the calculation is
wrong.
I disable the contract until i can fix this problem.Very thankful for your report!
I will reply when i'm done with the contract.
Best regards:
-iFA
no it's false. You assume you can divide both sides of the modulo and preserve the chances, it does not work like that.
the bignumber*1million should be a multiple of 118'181'817 for your contract to trigger the transaction.
that's 1 chance over 118'181'817
it's not the same as bigNumber divisable by 118 which is a chance over 118.
Btw you should know that there are no float (real) numbers in solidity so your 118.18 makes no sense.