<commit_before>﻿// This is an open source non-commercial project. Dear PVS-Studio, please check it. PVS-Studio Static
// Code Analyzer for C, C++ and C#: http://www.viva64.com
namespace EOpt.Math
{
    using System;

    /// <summary>
    /// Class for global constants. 
    /// </summary>
    public static class Constants
    {
        private static double ComputEps()
        {
            double eps, eps2, eps21;

            eps = 1.0;
            eps2 = eps * 0.5;

            eps21 = eps2 + 1.0;

            while (eps21 > 1.0)
            {
                eps = eps2;
                eps2 = eps * 0.5;
                eps21 = eps2 + 1.0;
            }
            return eps;
        }

        /// <summary>
        /// Machine's epsilon for double. 
        /// </summary>
        public static readonly double EPS;

        /// <summary>
        /// Exponent of machine epsilon. 
        /// </summary>
        public static readonly int EPS_EXPONENT;

        /// <summary>
        /// Number, which add for avoiding division by zero. 
        /// </summary>
        public static readonly double VALUE_AVOID_DIV_BY_ZERO;

        static Constants()
        {
            double eps = ComputEps();

            int exponnet = (int)Math.Floor(Math.Log10(eps));

            EPS_EXPONENT = exponnet;

            VALUE_AVOID_DIV_BY_ZERO = Math.Pow(10, exponnet / 2);

            EPS = eps;
        }
    }
}<commit_msg>Added a new constant the binary logarithm of two<commit_after>﻿// This is an open source non-commercial project. Dear PVS-Studio, please check it. PVS-Studio Static
// Code Analyzer for C, C++ and C#: http://www.viva64.com
namespace EOpt.Math
{
    using System;

    /// <summary>
    /// Class for global constants. 
    /// </summary>
    public static class Constants
    {
        private static double ComputEps()
        {
            double eps, eps2, eps21;

            eps = 1.0;
            eps2 = eps * 0.5;

            eps21 = eps2 + 1.0;

            while (eps21 > 1.0)
            {
                eps = eps2;
                eps2 = eps * 0.5;
                eps21 = eps2 + 1.0;
            }
            return eps;
        }

        /// <summary>
        /// Machine's epsilon for double. 
        /// </summary>
        public static readonly double EPS;

        /// <summary>
        /// Exponent of machine epsilon. 
        /// </summary>
        public static readonly int EPS_EXPONENT;

        /// <summary>
        /// Number, which add for avoiding division by zero. 
        /// </summary>
        public static readonly double VALUE_AVOID_DIV_BY_ZERO;

        /// <summary>
        /// Math.Log(2).
        /// </summary>
        public static readonly double LN_2;

        static Constants()
        {
            double eps = ComputEps();

            int exponnet = (int)Math.Floor(Math.Log10(eps));

            EPS_EXPONENT = exponnet;

            VALUE_AVOID_DIV_BY_ZERO = Math.Pow(10, exponnet / 2);

            EPS = eps;

            LN_2 = Math.Log(2);
        }
    }
}
{'fraction_non_alphanumeric': 0.11194762684124386, 'fraction_numerical': 0.022913256955810146, 'mean_word_length': 1.3186646433990896, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '903205', 'n_tokens_mistral': 1006, 'n_tokens_neox': 888, 'n_words': 256}