Numerical utilities for Common Lisp

Upstream URL


Tamas K Papp <>


Boost Software License - Version 1.0, Same as CL-NUM-UTILS -- this is part of the CL-NUM-UTILS library.
This repository is archived. You may find an updated version of these

libraries at


This library implements simple numerical functions for Common Lisp, including

  • num=, a comparison operator for floats
  • simple arithmeric functions, like sum and l2norm
  • elementwise operations for arrays
  • intervals
  • special matrices and shorthand for their input
  • sample statistics
  • Chebyshev polynomials
  • univariate rootfinding

See the sources and the docstring for more details.

All the functionality has corresponding unit tests.

1.1Symbol conflicts with alexandria

When you import both cl-num-utils and alexandria, you get symbol conflicts. There are two solutions for this: either import only parts of cl-num-utils (see the packages named in each file), or shadow some symbols, eg

  (cl:defpackage #:my-package
    (:use #:cl
    (:shadowing-import-from #:alexandria #:mean #:variance #:median))

1.2Reporting bugs

Bugs are tracked on Github, please open an issue if you find one.


1.3.1TODOfinish histogram code, write tests

1.3.2TODOdecide whether recursive indexes are practical

code is still there, but commented out

Dependencies (6)

  • alexandria
  • anaphora
  • array-operations
  • cl-slice
  • clunit
  • let-plus
  • GitHub
  • Quicklisp