Menu

Tree [7df500] default tip /
 History

Read Only access


File Date Author Commit
 build-aux 2026-03-09 Barry Schwartz Barry Schwartz [78c5e4] Added a means to automatically find PATSHOME.
 m4 2026-03-09 Barry Schwartz Barry Schwartz [78c5e4] Added a means to automatically find PATSHOME.
 maintainer-extras 2023-03-16 Barry Schwartz Barry Schwartz [6b7f12] Corrected tests.
 tests 2023-04-14 Barry Schwartz Barry Schwartz [33f966] Some things should have had boolc2ats done. Als...
 xprelude 2023-04-21 Barry Schwartz Barry Schwartz [4ce49e] Added means to prevent re-configuration of GMP.
 .dir-locals.el 2023-01-12 Barry Schwartz Barry Schwartz [2c16ed] Initial commit.
 .hgignore 2023-01-12 Barry Schwartz Barry Schwartz [2c16ed] Initial commit.
 AUTHORS 2023-01-12 Barry Schwartz Barry Schwartz [2c16ed] Initial commit.
 COPYING 2023-01-12 Barry Schwartz Barry Schwartz [2c16ed] Initial commit.
 INSTALL 2023-01-12 Barry Schwartz Barry Schwartz [2c16ed] Initial commit.
 Makefile.am 2023-03-20 Barry Schwartz Barry Schwartz [844fbd] Link the library with -lm
 Makefile.in 2026-03-09 Barry Schwartz Barry Schwartz [7df500] Remove decimal floating point types that were c...
 README 2023-02-12 Barry Schwartz Barry Schwartz [8e4a20] Revise the README.
 aclocal.m4 2026-03-09 Barry Schwartz Barry Schwartz [78c5e4] Added a means to automatically find PATSHOME.
 aminclude_static.am 2026-03-09 Barry Schwartz Barry Schwartz [7df500] Remove decimal floating point types that were c...
 ats2-xprelude-macros.m4.in 2023-02-07 Barry Schwartz Barry Schwartz [35e6cb] Some fancy but unimportant rework of ipow.c.
 ats2-xprelude.pc.in 2026-03-09 Barry Schwartz Barry Schwartz [f9777c] Fixed the pkg-config file.
 autogen.sh 2023-01-12 Barry Schwartz Barry Schwartz [2c16ed] Initial commit.
 bisection_iterator-support.dats.m4 2023-02-10 Barry Schwartz Barry Schwartz [99c87d] A bit of using exrats as bigints.
 common-macros.m4.in 2023-02-06 Barry Schwartz Barry Schwartz [931301] A rather too complex fallback scheme for ctz. N...
 configure 2026-03-09 Barry Schwartz Barry Schwartz [7df500] Remove decimal floating point types that were c...
 configure.ac 2026-03-09 Barry Schwartz Barry Schwartz [7df500] Remove decimal floating point types that were c...
 exrat-implementations.dats.m4 2023-01-23 Barry Schwartz Barry Schwartz [d46071] Added g0float_g0int_pow to exrat.
 exrat-support.dats.m4 2023-02-12 Barry Schwartz Barry Schwartz [574dda] Integer divisions for exrat.
 fixed32p32-implementations.dats.m4 2023-01-23 Barry Schwartz Barry Schwartz [45c3a2] Added prebuilt exponentiation for fixed32p32
 fixed32p32_division.c.m4 2023-03-16 Barry Schwartz Barry Schwartz [6b7f12] Corrected tests.
 fixed32p32_multiplication.c.m4 2023-01-24 Barry Schwartz Barry Schwartz [43d4e4] Make more use of m4.
 fixed32p32_square_root.dats.m4 2023-02-05 Barry Schwartz Barry Schwartz [635b0a] Remove dependence on Gnulib.
 float-implementations.dats.m4 2023-01-23 Barry Schwartz Barry Schwartz [215a8c] A new way to build implementations.
 float-strto.c.m4 2023-02-05 Barry Schwartz Barry Schwartz [544d6e] Remove all dependence on Gnulib and autoheader.
 gmp-support.dats.m4 2023-04-21 Barry Schwartz Barry Schwartz [4ce49e] Added means to prevent re-configuration of GMP.
 integer-implementations.dats.m4 2023-02-03 Barry Schwartz Barry Schwartz [79175d] I added ctz and gcd.
 ipow.dats.m4 2023-02-07 Barry Schwartz Barry Schwartz [cd0aa1] Added g1 versions of ipow, and also fixed a bug...
 list-ats-dependencies.dats.in 2023-01-12 Barry Schwartz Barry Schwartz [2c16ed] Initial commit.
 mpfr-implementations.dats.m4 2023-01-24 Barry Schwartz Barry Schwartz [9e20d1] mpfr support as far as the ability to assign a ...
 mpfr-support.dats.m4 2023-02-03 Barry Schwartz Barry Schwartz [730ceb] mpfr strto now handles hexadecimal strings.
 pats_ccomp_exception.h.array 2023-01-31 Barry Schwartz Barry Schwartz [f76d44] Fixed a spelling error.
 silent-rules.mk 2023-01-12 Barry Schwartz Barry Schwartz [2c16ed] Initial commit.
 strfrom-support.dats.m4 2023-01-23 Barry Schwartz Barry Schwartz [215a8c] A new way to build implementations.
 strto-support.dats.m4 2023-01-30 Barry Schwartz Barry Schwartz [6f425e] Replacement versions of strto for conventional ...
 tostrptr_fixed32p32.dats.m4 2023-01-24 Barry Schwartz Barry Schwartz [43d4e4] Make more use of m4.

Read Me

Extensions to, and bugfixes for, the ATS2 prelude.
--------------------------------------------------

* Expanded support for integer types, and workarounds for
  bugs. Changes include at least the following:

    - I have added intmax and uintmax.

    - I have worked around bugs in g1 versions of comparisons with
      zero.

    - I have tightened the postconditions of g1 versions of mod and
      nmod.

    - I have expanded the set of integer power routines, and implement
      pre-compiled versions that are loop-free. (The behavior when
      there is signed integer overflow may differ from that of the
      prelude. I consider this unimportant, because signed integer
      overflow is a bad thing.)

    - I have added ‘true Euclidean division’ of signed integers,
      where the remainder is always non-negative.

    - I have added gcd.

    - I have added ‘count trailing zeros’, ‘find first set’, ‘find
      last set’, ‘population count’.

* Expanded support for floating point, and workarounds for bugs.

* Support for the following floating point types: float16, float32,
  float64, float128, float16x float32x, float64x, float128x,
  decimal32, decimal64, decimal128, decimal64x, decimal128x. Your C
  compiler and libraries are likely to support some of these but not
  others, in varying degrees. ¶ Footnote: On AMD64, the ldouble type
  is stored on 128-bit boundaries, but it is NOT a 128-bit floating
  point type. It is an 80-bit floating point type, which is stored on
  32-bit boundaries on x86. If you want quad precision on AMD64, use
  float128 (which requires libraries that come with GCC).

* 32+32-bit fixed point, treated as if it were floating point
  (g0float).

* Optionally: exact rationals, via the GNU Multiple Precision
  Arithmetic Library (GMP). These are a nonlinear type (for garbage
  collection), and are treated as if they were floating point
  (g0float). ¶ The exact rationals support ‘big integer’ operations on
  their numerators, and thus you can represent a big integer as an
  exrat with denominator one. ¶ If you enable exact rationals, you
  also get ‘bisection iterators’. These can be useful when one
  implements an algorithm that adaptively bisects intervals.

* Optionally: multiple precision floating point numbers, via the GNU
  Multiple Precision Floating-Point Reliable Library (MPFR). As with
  exact rationals, these are a nonlinear type (for garbage
  collection), and are treated as if they were floating point
  (g0float). ¶ Currently (and probably forever), if you enable
  multiple precision floating point, you also must enable exact
  rationals. However, this should be no problem, because MPFR itself
  uses GMP: if you have the former, you most likely have the
  latter. Furthermore, both are necessary to build GCC.

* Sorting, with algorithms selectable via -DATS flag.

---

References for some obscure integer algorithms, such as for counting
trailing zeros or ones, and calculating population count:

  {{cite web
   | title       = Bit Twiddling Hacks
   | url         = https://graphics.stanford.edu/~seander/bithacks.html
   | date        = 2023-01-14
   | archiveurl  = http://archive.today/GNADt
   | archivedate = 2023-01-14 }}

  {{cite web
   | title       = BitScan - Chessprogramming wiki
   | url         = https://www.chessprogramming.org/index.php?title=BitScan&oldid=22495
   | date        = 2023-02-03
   | archiveurl  = http://archive.today/iPXfa
   | archivedate = 2023-02-03 }}

The algorithms may appear in any of ATS, C, or m4 code.

---

Licensing:

  This program is free software: you can redistribute it and/or
  modify it under the terms of the GNU General Public License, as
  published by the Free Software Foundation, either version 3 of the
  License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You should have received copies of the GNU General Public License
  along with this program. If not, see
  <https://www.gnu.org/licenses/>.

---
MongoDB Logo MongoDB