<commit_before>#ifdef sgi
#include <sys/fpu.h>

/*
THE FOLLOWING FUNCTION
sets the special "flush zero" but (FS, bit 24) in the
Control Status Register of the FPU of R4k and beyond
so that the result of any underflowing operation will
be clamped to zero, and no exception of any kind will
be generated on the CPU.  This has no effect on
an R3000.
*/

void flush_all_underflows_to_zero()
{
	union fpc_csr f;
	f.fc_word = get_fpc_csr();
	f.fc_struct.flush = 1;
	set_fpc_csr(f.fc_word);
}
#endif
#ifdef LINUX

#include <stdio.h>
#include <signal.h>

void flush_fpe (int sig)
{
  if (sig==SIGFPE)
   {
      printf("RTCMIX WARNING:  attempt to divide by zero!\n");
      return;
   }
  printf("RTCMIX FATAL ERROR:  division by zero halted process.\n");
  exit(1);
}
#endif
<commit_msg>- Change 'flush_fpe' to 'sigfpe_handler', which is more accurate. - Change sigfpe_handler errmsg to be more generic (because it's not   necessarily the case that it will be called due to a div by zero). - Exit instead of returning from sigfpe_handler, to prevent endless   loop.  (The handler will be called forever if this signal is raised.)<commit_after>#ifdef sgi
#include <sys/fpu.h>

/*
THE FOLLOWING FUNCTION
sets the special "flush zero" but (FS, bit 24) in the
Control Status Register of the FPU of R4k and beyond
so that the result of any underflowing operation will
be clamped to zero, and no exception of any kind will
be generated on the CPU.  This has no effect on
an R3000.
*/

void flush_all_underflows_to_zero()
{
	union fpc_csr f;
	f.fc_word = get_fpc_csr();
	f.fc_struct.flush = 1;
	set_fpc_csr(f.fc_word);
}
#endif

#ifdef LINUX

#include <stdio.h>
#include <signal.h>

void sigfpe_handler(int sig)
{
   fprintf(stderr,
           "\nRTcmix FATAL ERROR: floating point exception halted process.\n");
   exit(1);
}

#endif

{'fraction_non_alphanumeric': 0.09055982436882547, 'fraction_numerical': 0.009879253567508232, 'mean_word_length': 3.9137466307277626, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6852411', 'n_tokens_mistral': 666, 'n_tokens_neox': 639, 'n_words': 245}