You can't do it with numbers the language and your hardware offers.
Search the net for a library calculating with strings or with special algorithms calcuating with chunks of the whole numbers.
abcmql4:
I tried everything to see or take that value with all these decimals, but will not let me do it,
the situation is that after 15 decimal, round me, and I need not rounded, NO,
example, in case of the result is as follows:
I take a number in sequence to see how it behaves and how it is in the "string."
but the result is rounded, the sequence is also lost in the 14 decimal, and comes another set of numbers instead of sequences ..... 678901234 .....which is expected or needed
How can I do, how I can take a "double" as well, a "string" will be of tremendous help ......
thank you very much
The question however is why you would need, or indeed would rely on arbitrary precision. You need a better understanding of number representation before you throw an arbitrary precision library at a problem. Even in scientific computing, it is hardly ever needed! Models and algorithms for their numerical evaluation have errors that almost always exceed the cut-off and rounding error associated with double-precision number representation and operations.
Because external double-precision representations (64 bit=8 byte IEEE-754 format) of machine doubles (120 bit extended precision to allow all machine operations to be exact within the external 64 bit representation) have a 54 bit mantissa, machine epsilon (meps) is about 2e-16 ((1.+meps) - 1. >). That number 1.2345678901....(up to 106 digits) you gave might not even be exactly representable in an arbitrary precision library, unless it uses a rational number-based representation. Irrational numbers are not representable with a finite number of bits, even with an arbitrary precision library (you'll run out of memory eventually).
Also, and that is even worse: arbitrary precision number arithmetics is relatively and arbitrarily slow, in a large part exactly because it is not hardware-supported. You don't want arbitrary precision operations in the inner loops of your trading algorithms. And if it's for preliminary statistical analysis and backtesting/optimisation, modeling error and numerical error will most definitely trump the precision (15 to 16 significant figures) provided by doubles, unless you have a perfect theory of financial markets _and_ perfect numerical algorithms to solve/evaluate the theory's equations.
So, with all due respect, but I think your requirement for arbitrary precision is misguided...unless you use MQL4/5 for something else, of course :-)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I tried everything to see or take that value with all these decimals, but will not let me do it,
the situation is that after 15 decimal, round me, and I need not rounded, NO,
example, in case of the result is as follows:
I take a number in sequence to see how it behaves and how it is in the "string."
but the result is rounded, the sequence is also lost in the 14 decimal, and comes another set of numbers instead of sequences ..... 678901234 .....which is expected or needed
How can I do, how I can take a "double" as well, a "string" will be of tremendous help ......
thank you very much