Not currently logged in. Login now.

Library

Name:primitive-math
Category:Math
Subcategory:General
License:MIT license
Description:
Clojure's numeric tower is useful, but it can put a lot of steps between you and simple arithmetic. Unfortunately, while Clojure will warn you when reflection is required to invoke a function, it will not warn you when reflection is required to perform math. The only reliable way to discover whether you're calling clojure.lang.Number.add(Object, Object) or clojure.lang.Number.add(long, long) is to use a profiler or decompiler.

Or you can just bypass Clojure's math operators altogether.

In the primitive-math namespace, there are equivalents for every arithmetic operator and comparator that will give a reflection warning if it cannot compile down to a simple, predictable, unboxed mathematical operation.
Maven Group and Artifact Id:[primitive-math/primitive-math "version"]
Date Added:2013-07-13 10:33:29
Date Changed:2013-07-13 10:33:29