(ns same.klipse (:require-macros [same :refer [with-comparator]]) (:require [same :refer [ish? zeroish? not-zeroish? set-comparator!]] [same.compare :refer [compare-ulp]] [same.ish :refer [default-comparator]]))

Click here to make these examples interactive with ClojureScript.

Custom Comparators

By default, same/ish uses a combination of absolute difference, for numbers near zero, and difference in units in the last place (ULP) for larger numbers.

Ths can be overridden by changing the comparator using with-comparator or set-somparator!.