<commit_before>import math

# RNG from MILC version 6
# C language random number generator for parallel processors
# exclusive or of feedback shift register and integer congruence
# generator.  Use a different multiplier on each generator, and make sure
# that fsr is initialized differently on each generator.

type RngMilc6* = object
  r0, r1, r2, r3, r4, r5, r6: uint32
  icState, multiplier: uint32
  when defined(FUELCompat):
    # for Gaussian
    iset: int32
    gset: float

template isWrapper*(x: RngMilc6): untyped = false

proc `$`*(x:RngMilc6):string =
  result = "RngMilc6 r:[ " & $x.r0
  result &= " " & $x.r1
  result &= " " & $x.r2
  result &= " " & $x.r3
  result &= " " & $x.r4
  result &= " " & $x.r5
  result &= " " & $x.r6
  result &= " ]  icState: " & $x.icState & " multiplier: " & $x.multiplier
  when defined(FUELCompat):
    result &= " iset: " & $x.iset & " gset: " & $x.gset<commit_msg>RngMilc6: add `[]` for builds without simd<commit_after>import math

# RNG from MILC version 6
# C language random number generator for parallel processors
# exclusive or of feedback shift register and integer congruence
# generator.  Use a different multiplier on each generator, and make sure
# that fsr is initialized differently on each generator.

type RngMilc6* = object
  r0, r1, r2, r3, r4, r5, r6: uint32
  icState, multiplier: uint32
  when defined(FUELCompat):
    # for Gaussian
    iset: int32
    gset: float

template isWrapper*(x: RngMilc6): untyped = false

template `[]`*(x: RngMilc6): untyped = x

proc `$`*(x:RngMilc6):string =
  result = "RngMilc6 r:[ " & $x.r0
  result &= " " & $x.r1
  result &= " " & $x.r2
  result &= " " & $x.r3
  result &= " " & $x.r4
  result &= " " & $x.r5
  result &= " " & $x.r6
  result &= " ]  icState: " & $x.icState & " multiplier: " & $x.multiplier
  when defined(FUELCompat):
    result &= " iset: " & $x.iset & " gset: " & $x.gset
{'fraction_non_alphanumeric': 0.1416535018430753, 'fraction_numerical': 0.02738283307003686, 'mean_word_length': 3.3577981651376145, 'pattern_counts': {'":': 0, '<': 3, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2599321', 'n_tokens_mistral': 727, 'n_tokens_neox': 698, 'n_words': 209}