<commit_before>#ifndef INCLUDED_SHADERS_APPROX_H_hlasdfjhl
#define INCLUDED_SHADERS_APPROX_H_hlasdfjhl

#ifndef M_PI
#define M_PI 3.1415926535897932384626433832795
#endif

#ifndef M_PI_4
#define M_PI_4 0.78539816339744830962
#endif

// assumes 0 <= x
float fast_atan_pos(float x) {
  vec3 A = x < 1 ? vec3(x, 0, 1) : vec3(1 / x, 0.5 * M_PI, -1);
  return A.y + A.z * (((-0.130234 * A.x - 0.0954105) * A.x + 1.00712) * A.x - 0.00001203333);
}

// assumes -1 <= x <= 1
float fast_atan_small(float x) {
  float ax = abs(x);
  return M_PI_4 * x - x * (ax - 1) * (0.2447 + 0.0663*ax);
}

#endif<commit_msg>use common pi<commit_after>#ifndef INCLUDED_SHADERS_APPROX_GLSL_hlasdfjhl
#define INCLUDED_SHADERS_APPROX_GLSL_hlasdfjhl

#include "common.glsl"

// assumes 0 <= x
float fast_atan_pos(float x) {
  vec3 A = x < 1 ? vec3(x, 0, 1) : vec3(1 / x, 0.5 * pi, -1);
  return A.y + A.z * (((-0.130234 * A.x - 0.0954105) * A.x + 1.00712) * A.x - 0.00001203333);
}

// assumes -1 <= x <= 1
float fast_atan_small(float x) {
  float ax = abs(x);
  return pi_4 * x - x * (ax - 1) * (0.2447 + 0.0663*ax);
}

#endif
{'fraction_non_alphanumeric': 0.16560509554140126, 'fraction_numerical': 0.15559599636032756, 'mean_word_length': 3.347826086956522, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, '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': '1958373', 'n_tokens_mistral': 628, 'n_tokens_neox': 527, 'n_words': 117}