<commit_before>/*=============================================================================

  finite_sum.c

  Efficiently computing the finite sum part of the Riemann theta function.

  Authors
  -------

  *<NAME> (<EMAIL>) - September 2012
  *<NAME> (<EMAIL>) - October 2012

=============================================================================*/

#ifndef __FINITE_SUM_C__
#define __FINITE_SUM_C__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include <stdlib.h>
#include <stdio.h>
#include <math.h>

/******************************************************************************
  exppart
  -------

  A helper function for the finite sum functions. Computes

	     2pi < (n-intshift), (1/2)X(n-intshift) + x >

******************************************************************************/

double
exppart(double* n, double* X, double* x, double* intshift, int g)
{
  double* tmp1 = (double*)malloc(g*sizeof(double));<commit_msg>[#113] Define M_PI when not already defined<commit_after>/*=============================================================================

  finite_sum.c

  Efficiently computing the finite sum part of the Riemann theta function.

  Authors
  -------

  *<NAME> (<EMAIL>) - September 2012
  *<NAME> (<EMAIL>) - October 2012

=============================================================================*/

#ifndef __FINITE_SUM_C__
#define __FINITE_SUM_C__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include <stdlib.h>
#include <stdio.h>
#include <math.h>

#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

/******************************************************************************
  exppart
  -------

  A helper function for the finite sum functions. Computes

	     2pi < (n-intshift), (1/2)X(n-intshift) + x >

******************************************************************************/

double
exppart(double* n, double* X, double* x, double* intshift, int g)
{
  double* tmp1 = (double*)malloc(g*sizeof(double));
{'fraction_non_alphanumeric': 0.41123818995524614, 'fraction_numerical': 0.023868722028841372, 'mean_word_length': 5.387301587301588, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '6599973', 'n_tokens_mistral': 623, 'n_tokens_neox': 531, 'n_words': 143}