{'fraction_non_alphanumeric': 0.025231286795626577, 'fraction_numerical': 0.002523128679562658, 'mean_word_length': 5.230366492146596, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, '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}}
Aarith: an arbitrary precision number library

Developing customized arithmetic hardware units is a very difficult and error-prone process, especially when using non-standard bit-widths for number representation. In the early stages of development, the actual details of the physical implementation might not be of interest. Synthesis from hardware description languages like VHDL or Verilog takes a large amount of (computation) time, effectively preventing an agile experimentation cycle. As a remedy we present aarith, an easy to use, header-only C++ large number library for hardware simulation. Aarith supports unsigned and signed two's complement integers of arbitrary bit-widths as well as IEEE 754 floating point numbers with arbitrary bit-widths for the exponent and the mantissa. Aarith allows to easily manipulate the individual bits of the numbers, making it an ideal framework for developing and functionally evaluating customized arithmetic (hardware) units. The design goal is to provide a framework that is simple to learn and use. The provided number types are intended to blend in with the native number types. The framework is publicly available as open-source software.