# Is it vooddoo? Why is e-05 added at the end of some of my doubles? A search engine query didn't help.

129

This is weird. My Expert Advisor was working and 5 minutes later I couldn't make it work again.

Investigating led me to this issue. It seems like some numbers get corrupted, because NormalizeDouble() and other functions taking doubles as input will only output zero with them.

Note that I didn't touch the problematic function before it broke. And the little I changed I converted to comments to narrow down the problem.

1388

kb4ski:

This is weird. My Expert Advisor was working and 5 minutes later I couldn't make it work again.

Investigating led me to this issue. It seems like some numbers get corrupted, because NormalizeDouble() and other functions taking doubles as input will only output zero with them.

Note that I didn't touch the problematic function before it broke. And the little I changed I converted to comments to narrow down the problem.

This is the so called exponential or E notation.
https://en.m.wikipedia.org/wiki/Scientific_notation

1E-5 equals 1 x 10‐⁵ = 0.00001
1E5 or 1E+5 equals 1 x 10⁵ = 100.000
129

tomm73:

This is the so called exponential or E notation.
https://en.m.wikipedia.org/wiki/Scientific_notation

1E-5 equals 1 x 10‐⁵ = 0.00001
1E5 or 1E+5 equals 1 x 10⁵ = 100.000

Still wondering how the code could break suddenly without reason.
20226

kb4ski how the code could break suddenly without reason.

It hasn't "broke without reason."  You just didn't notice it before. 1E-5 is less characters than 0.00001.

If you want to see the correct number of digits, convert it to a string with the correct/wanted accuracy.
question about decima of marketinfo() - MQL4 programming forum
129

William Roeder:

It hasn't "broke without reason."  You just didn't notice it before.

I would have noticed if didn't work, but like I said it was working and BOOM, it stopped working out of nowhere 5 minutes later.

129

William Roeder:

1E-5 is less characters than 0.00001.

By the way it is e-05, not 1E-5,
1388

kb4ski:

Still wondering how the code could break suddenly without reason.
The leading 1 is just an example. E-05 means "move  the comma 5  numbers to the left". 234.56 E-05 = 0.0023455 or 234.56 divided by 100000.
129

tomm73:
The leading 1 is just an example. E-05 means "move  the comma 5  numbers to the left". 234.56 E-05 = 0.0023455 or 234.56 divided by 100000.

Yes but why do other people on the forum get 1e-05? I just noticed that the results I was getting earlier when searching for "e-05" on this forum have disappeared. Who is messing with me again?

To be more precise, why for example would Ask - Bid return a number with the scientific notation?
129

1388

kb4ski: