You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Eight pages about rounding. I think we used to learn that in the fourth grade :(
Eight pages about rounding. I think we used to learn that in the fourth grade :(
Heh. That's the wrong way round. Totally wrong results.
+++
However, if a number is longer than 15 decimal places, it still needs to be trimmed somehow, otherwise it doesn't work properly.
Double precision floating point numbers are accurate to 15-17 decimal digits
0 21:59:20.485 ! tests GBPUSDbc,H1: v1 = 14 = 1
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 0 = 1.123456789012345
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 1 = 1.12345678901234
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 2 = 1.1234567890123
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 3 = 1.123456789012
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 4 = 1.12345678901
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 5 = 1.1234567890
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 6 = 1.123456789
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 7 = 1.12345678
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 8 = 1.1234567
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 9 = 1.123456
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 10 = 1.12345
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 11 = 1.1234
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 12 = 1.123
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 13 = 1.12
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 14 = 1.1
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 15 = 1
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 0 = 1.123456789012346
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 1 = 1.12345678901234
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 2 = 1.1234567890123
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 3 = 1.123456789012
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 4 = 1.12345678901
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 5 = 1.1234567890
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 6 = 1.123456789
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 7 = 1.12345678
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 8 = 1.1234567
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 9 = 1.123456
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 10 = 1.12345
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 11 = 1.1234
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 12 = 1.123
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 13 = 1.12
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 14 = 1.1
0 22:02:48.826 ! tests GBPUSDbc,H1: v1 = 15 = 1
0 21:59:20.485 ! tests GBPUSDbc,H1: v1 = 14 = 1
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 0 = 1.123456789012345
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 1 = 1.12345678901234
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 2 = 1.1234567890123
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 3 = 1.123456789012
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 4 = 1.12345678901
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 5 = 1.1234567890
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 6 = 1.123456789
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 7 = 1.12345678
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 8 = 1.1234567
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 9 = 1.123456
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 10 = 1.12345
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 11 = 1.1234
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 12 = 1.123
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 13 = 1.12
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 14 = 1.1
0 22:01:25.346 ! tests GBPUSDbc,H1: v1 = 15 = 1
И?
2016.02.25 22:06:56.781 prob EURUSD,H1: Alert: 1.123456789012345
I've discounted that no more than 17 characters dubbed. What else do you need?
There's already some talk of circumcision here :)
For example?
DoubleToStr(0.9999,3)=1.000
So, draw your conclusions.
2016.02.25 22:06:56.781 prob EURUSD,H1: Alert: 1.123456789012345
I've discounted that no more than 17 characters dubbed. What else do you need?
Try 14 and explain why
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 0 = 0.909090909091
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 1 = 0.90909090909
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 2 = 0.909090909090
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 3 = 0.909090909
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 4 = 0.9090909090
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 5 = 0.909090909
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 6 = 0.90909090
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 7 = 0.9090909
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 8 = 0.909090
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 9 = 0.90909
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 10 = 0.9090
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 11 = 0.909
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 12 = 0.90
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 13 = 0.9
0 22:15:05.379 ! tests GBPUSDbc,H1: v1 = 14 = 0