Interesting.
#define EPSILON (1.0e-7 + 1.0e-13)
Why is your EPSILON defined as this value ?Alain Verleyen:
I do not remember...Why is your EPSILON defined as this value ?
Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий
Альтернативные реализации стандартных функций/подходов
fxsaber, 2016.09.02 10:58
double MyNormalizeDouble( const double Value, const uint digits ) { static const double Points[] = {1.0e-0, 1.0e-1, 1.0e-2, 1.0e-3, 1.0e-4, 1.0e-5, 1.0e-6, 1.0e-7, 1.0e-8}; const double point = digits > 8 ? 1.0e-8 : Points[digits]; const long Integer = (long)Value; // чтобы не создавать крайне медленный относительный epsilon return((long)((Value > 0) ? (Value - Integer) / point + HALF_PLUS : (Value - Integer) / point - HALF_PLUS) * point + Integer); }
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
Price_Compare:
This small cross-platform library allows to compare the 'double' values of the "price" conveniently and quickly.
Author: fxsaber