Questions from a "dummy" - page 158

 
Can you tell me how to generate magic so that it does not repeat among open and pending orders, or among closed and deleted orders?
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров - Документация по MQL5
 

assign the magician - text time in seconds to (int)TimeCurrent();

There will be no such thing.

If it is too cumbersome for you, you may divide or subtract

numeric type (int) constant :-)

 

Hello!

If you look in the handbook (MKL), you can see:

DBL_MAXThe maximum value that can be represented by the type double
1.7976931348623158e+308

1.7976931348623158e+308 is a number that has 309 whole digits! Of course this can't be. Maybe I'm wrong? But then how should we interpret this entry ( 1.79769313483623158e+308 )?

Документация по MQL5: Основы языка / Типы данных / Вещественные типы (double, float)
Документация по MQL5: Основы языка / Типы данных / Вещественные типы (double, float)
  • www.mql5.com
Основы языка / Типы данных / Вещественные типы (double, float) - Документация по MQL5
 
220Volt:

Hello!

If you look in the handbook (MKL), you can see:

DBL_MAXThe maximum value that can be represented by the type double
1.7976931348623158e+308

1.7976931348623158e+308 is a number that has 309 whole digits! Of course this can't be. Maybe I'm wrong? But then how should we interpret this entry ( 1.79769313483623158e+308 )?

Maybe this is the maximum floating point number that can fit into 8 bytes of memory.
 
Silent:
Maybe so - the maximum floating-point number that can fit into 8 bytes of memory.
No doubt it is. But 1.7976931348623158e+308 is how much? Above gave some thoughts, there is something wrong, I would like to understand what it is.
 
220Volt:
No doubt that's exactly right. But 1.7976931348623158e+308 is what? Above gave some thoughts, something is wrong there, I would like to understand what exactly.

It seems to be 553.6894855375932664...

"In computing machines, it is customary to separate the exponent from the mantissa by the letter "E" (exponent). For example, the number 1.528535047-10-25 is written as 1.528535047E-25 in most high-level programming languages."

http://ru.wikipedia.org/wiki/Плавающая_запятая

PS Wrong.

10*308=3080
1.7976931348623158*3080=5536.894855375932664

Число с плавающей запятой — Википедия
  • ru.wikipedia.org
Число с плавающей запятой (или число с плавающей точкой) — форма представления действительных чисел, в которой число хранится в форме мантиссы и показателя степени. При этом число с плавающей запятой имеет фиксированную относительную точность и изменяющуюся абсолютную. Используемое наиболее часто представление утверждено в стандарте IEEE 754...
 
Silent:

It seems to be 553.6894855375932664...

"In computing machines, it is customary to separate the exponent from the mantissa by the letter "E" (exponent). For example, the number 1.528535047-10-25 is written as 1.528535047E-25 in most high-level programming languages."

http://ru.wikipedia.org/wiki/Плавающая_запятая

PS Wrong.

10*308=3080
1.7976931348623158*3080=5536.894855375932664

Nah, something doesn't add up:

double d = 5536.894855375932664;   // предпологаемый лимит
Alert(d);
d = 6536.894855375932664;          // число больше лимита
Alert(d);

Alert: 5536.894855375933.

Alert: 6536.894855375933.

P.S. 5536 is very low. 308 must represent a degree

 
1.7976931348623158e+308 =1.7976931348623158 * 10^ 308 (by 10 to the power of 308)
 
220Volt:

Nah, something doesn't quite add up:

Alert: 5536.894855375933

Alert: 6536.894855375933

P.S. 5536 is very low. 308 should denote exactly the degree of

but otherwise
     double x,y,z;
     x=MathPow(
     y=1.7976931348623158,         // основание 
     z=3080      // показатель степени
     );
     Print("x = ",x);
it looks like an overflow.
2012.06.10 22:27:28     S (EURUSD,H1)   x = 1.#INF

citing

     int a=x;
     Print("a = ",a);

gives

2012.06.10 22:34:25     S (EURUSD,H1)    a = 0
confused myself :)
 
Karlson:
1.7976931348623158e+308 =1.7976931348623158 * 10^ 308 (10 to the power of 308)

Is this correct?

10*308=3080
1.7976931348623158*3080=5536.894855375932664