<commit_before>
// MT, 2016sep11

#ifndef MT_CALC
#define MT_CALC

#include <math.h>

#ifdef __cplusplus
extern "C" {
#endif
    
static double const Calc_PiMul2 = 2.0*M_PI; // 360 degree in radian.
static double const Calc_PiMul1_5 = 1.5*M_PI; // 270 degree in radian.
static double const Calc_PiMul0_5 = 0.5*M_PI; // 90 degree in radian.
    
#define CALC_TO_RAD(x) (((x)*M_PI)/180.0) // Converts degree to radian.
#define CALC_TO_DEG(x) (((x)*180.0)/M_PI) // Converts radian to degree.
#define CALC_ANGLE_TO_POS(x) ((x)<0.0?Calc_PiMul2+(x):(x)>=Calc_PiMul2?(x)-Calc_PiMul2:(x)) // Given angle, or positive equivalent, if negative angle given.

#define CALC_DOUBLE_TO_INT_ROUND(x) ((int)(((x)<0.0)?((x)-0.5):((x)+0.5)))
    <commit_msg>CALC_SIGN_FROM_DOUBLE() macro.<commit_after>
// MT, 2016sep11

#ifndef MT_CALC
#define MT_CALC

#include <math.h>

#ifdef __cplusplus
extern "C" {
#endif
    
static double const Calc_PiMul2 = 2.0*M_PI; // 360 degree in radian.
static double const Calc_PiMul1_5 = 1.5*M_PI; // 270 degree in radian.
static double const Calc_PiMul0_5 = 0.5*M_PI; // 90 degree in radian.
    
#define CALC_TO_RAD(x) (((x)*M_PI)/180.0) // Converts degree to radian.
#define CALC_TO_DEG(x) (((x)*180.0)/M_PI) // Converts radian to degree.
#define CALC_ANGLE_TO_POS(x) ((x)<0.0?Calc_PiMul2+(x):(x)>=Calc_PiMul2?(x)-Calc_PiMul2:(x)) // Given angle, or positive equivalent, if negative angle given.

#define CALC_SIGN_FROM_DOUBLE(x) ((int)(0.0<(x))-(int)((x)<0.0))
#define CALC_DOUBLE_TO_INT_ROUND(x) ((int)(((x)<0.0)?((x)-0.5):((x)+0.5)))
    
{'fraction_non_alphanumeric': 0.1790757381258023, 'fraction_numerical': 0.059050064184852376, 'mean_word_length': 4.669090909090909, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6993986', 'n_tokens_mistral': 745, 'n_tokens_neox': 693, 'n_words': 144}