<commit_before>discard """
  action: run
  matrix:"; -d:nimTmathCase2 -d:danger --passc:-ffast-math"
"""

# xxx: fix bugs for js then add: targets:"c js"

import math, random, os
import unittest
import sets, tables

block: # random int
  block: # there might be some randomness
    var set = initHashSet[int](128)

    for i in 1..1000:
      incl(set, rand(high(int)))
    check len(set) == 1000

  block: # single number bounds work
    var rand: int
    for i in 1..1000:<commit_msg>enable tmath tests for JS backend (#16562)<commit_after>discard """
  targets: "c cpp js"
"""

## xxx enable matrix:"; -d:nimTmathCase2 -d:danger --passc:-ffast-math"

import std/[math, random, os]
import std/[unittest]
import std/[sets, tables]

block: # random int
  block: # there might be some randomness
    var set = initHashSet[int](128)

    for i in 1..1000:
      incl(set, rand(high(int)))
    check len(set) == 1000

  block: # single number bounds work
    var rand: int
    for i in 1..1000:
{'fraction_non_alphanumeric': 0.13319878910191726, 'fraction_numerical': 0.04137235116044399, 'mean_word_length': 3.294372294372294, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6401233', 'n_tokens_mistral': 380, 'n_tokens_neox': 339, 'n_words': 116}