angevoyageur: Ok, Value returned is 95.96 because of rounding. That has nothing to do with what we are discussing, see my previous post : it's only output format.
Alain, I think what threw me off was "e-005". I didn't understand "e" represented exponent and "-005" represented decimal location (decimal moved five places to the right of the decimal's original position).
Alain, I think what threw me off was "e-005". I didn't understand "e" represented exponent and "-005" represented decimal location (decimal moved five places to the right of the decimal's original location).
Thank you
This not easy to apprehend at first. You can play with this wonderful tool, that helps to understand.
This converter allows you to convert numbers from decimal format to binary format and from binary format to decimal format. It supports the main variable data types used in most programming languages. It also floating point numbers (single and double precision) according to the standard IEEE754. Supported types are shown in the following table...
RaptorUK: Giving values won't help . . . read the thread, do some research, keep reading until you understand
/*In tester 0.00001000000000006551 returns as 1.000000000006551e-005 and
"NormalizeDouble(0.00001000000000006551,5);" returns as 1e-005.0*/
Comment(NormalizeDouble(0.00001000000000006551,5));
Value normalized (above).
Value original (above).
// desired value return is 0.00001.
Who had the brilliant idea to code the tester to return values in scientific notation? Hmm? Oh, and why!? Hmm? Documentation (https://www.mql5.com/en/docs/common/comment) reads along the lines of "...depending on what notation will be more compact.". Oh, its compact alright, Hahahahaha! ;)
Has anyone in the MQL5 community solved this problem I wish to solve?
Who had the brilliant idea to code the tester to return values in scientific notation? Hmm? Oh, and why!? Hmm? Documentation (https://www.mql5.com/en/docs/common/comment) reads along the lines of "...depending on what notation will be more compact.". Oh, its compact alright, Hahahahaha! ;)
Has anyone in the MQL5 community solved this problem I wish to solve?
Thank you
What this has to do with the Tester ?
In the same link you post, it's also written :
To output real numbers with another accuracy or in a predefined format, use the DoubleToString() function.
The fact is 0.00001 can't be represented accurately in binary format.
Who had the brilliant idea to code the tester to return values in scientific notation? Hmm? Oh, and why!? Hmm? Documentation (https://www.mql5.com/en/docs/common/comment) reads along the lines of "...depending on what notation will be more compact.". Oh, its compact alright, Hahahahaha! ;)
Has anyone in the MQL5 community solved this problem I wish to solve?
Maybe it's me . . . but it appears that we suggest that you read something that will help you, and you say "OK - I will" and then you promptly go away and do something else . . . then come back here and forget everything that was written in this thread to help you.
Do you remember this post ?
RaptorUK:
If you want to see 0.00001000000000xyz then use DoubleToStr() to format the output to your liking.
Can price != price is a different, but slightly connected, issue. It can't really be solved, first you need to understand what the issue is . . . then you work around it.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
"Sorry but I don't understand this sentence."
Thank you
Ok, Value returned is 95.96 because of rounding. That has nothing to do with what we are discussing, see my previous post : it's only output format.
Alain, I think what threw me off was "e-005". I didn't understand "e" represented exponent and "-005" represented decimal location (decimal moved five places to the right of the decimal's original position).
Thank you
Alain, I think what threw me off was "e-005". I didn't understand "e" represented exponent and "-005" represented decimal location (decimal moved five places to the right of the decimal's original location).
Thank you
This not easy to apprehend at first. You can play with this wonderful tool, that helps to understand.
This not easy to apprehend at first. You can play with this wonderful tool, that helps to understand.
What are your thoughts as to what this "can price != price" issue is?
It is the issue of comparing double values. Is value1 == value2, is value3 != value4, is value5 > value6, etc.
What are "value1,2,3,4,5's" values? Can you post an example please?
Thank you
What are "value1,2,3,4,5's" values? Can you post an example please?
Giving values won't help . . . read the thread, do some research, keep reading until you understand
Value normalized (above).
Value original (above).
// desired value return is 0.00001.Who had the brilliant idea to code the tester to return values in scientific notation? Hmm? Oh, and why!? Hmm? Documentation (https://www.mql5.com/en/docs/common/comment) reads along the lines of "...depending on what notation will be more compact.". Oh, its compact alright, Hahahahaha! ;)
Has anyone in the MQL5 community solved this problem I wish to solve?
Thank you
Value normalized (above).
Value original (above).
Who had the brilliant idea to code the tester to return values in scientific notation? Hmm? Oh, and why!? Hmm? Documentation (https://www.mql5.com/en/docs/common/comment) reads along the lines of "...depending on what notation will be more compact.". Oh, its compact alright, Hahahahaha! ;)
Has anyone in the MQL5 community solved this problem I wish to solve?
Thank you
To output real numbers with another accuracy or in a predefined format, use the DoubleToString() function.
Who had the brilliant idea to code the tester to return values in scientific notation? Hmm? Oh, and why!? Hmm? Documentation (https://www.mql5.com/en/docs/common/comment) reads along the lines of "...depending on what notation will be more compact.". Oh, its compact alright, Hahahahaha! ;)
Has anyone in the MQL5 community solved this problem I wish to solve?
Maybe it's me . . . but it appears that we suggest that you read something that will help you, and you say "OK - I will" and then you promptly go away and do something else . . . then come back here and forget everything that was written in this thread to help you.
Do you remember this post ?
RaptorUK:
If you want to see 0.00001000000000xyz then use DoubleToStr() to format the output to your liking.
or this . . .
RaptorUK:
So you mean something like this ?
Can price != price is a different, but slightly connected, issue. It can't really be solved, first you need to understand what the issue is . . . then you work around it.