You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is well known that floating point calcs can be non-deterministic across architectures / compilers etc.
Each call to the quant lib should report the precision to which it can be trusted. E.g. for risk factor short return:
rf e.g. 0.123456789
precision e.g. 1e-5.
This would mean that up to 5th decimal place we don't expect any floating point non-determinism to creep in.
Users can then round the result to 0.12345000 ignoring the remaining digits if they want to play safe.
Another example:
probability of trading 0.000000911
precision 1e-7
Core should use probability of trading 0.000000900
Another example:
probability of trading 0.000000911
precision 1e-3
Core should use probability of trading 0.
(I also have a strong feeling that I've written this somewhere already so if anyone knows where the issue is let me know) and link it here or delete this one...
The text was updated successfully, but these errors were encountered:
The other part of this discussion was to send the values coming out of floating-point calculations back through the consensus layer... so any floating point discrepancy is agreed upon as part of consensus and then the core is again working with the same values.
We can do this both with risk factors and with probability of trading. The core will simply have to have a cached view of all of all these numbers...
We should do both
the update to quant library here and
sending any float calc results via consensus (this would be a ticket in core).
Without 1) there is more chance of consensus failing... so 1) is needed even if we do 2).
It is well known that floating point calcs can be non-deterministic across architectures / compilers etc.
Each call to the quant lib should report the precision to which it can be trusted. E.g. for risk factor short return:
This would mean that up to 5th decimal place we don't expect any floating point non-determinism to creep in.
Users can then round the result to 0.12345000 ignoring the remaining digits if they want to play safe.
Another example:
Core should use probability of trading 0.000000900
Another example:
Core should use probability of trading 0.
@jeremyletang @peterbarrow @witgaw
(I also have a strong feeling that I've written this somewhere already so if anyone knows where the issue is let me know) and link it here or delete this one...
The text was updated successfully, but these errors were encountered: