cljs.math/negate-exact

functionsince v1.11.50Edit
(negate-exact a)

Source docstring:
Returns the negation of a, throws ArithmeticException on overflow. 
Source code @ clojurescript:src/main/cljs/cljs/math.cljs
(defn ^number negate-exact
  {:added "1.11.10"}
  [a]
  (if (or (> a js/Number.MAX_SAFE_INTEGER) (< a js/Number.MIN_SAFE_INTEGER))
    (throw (ex-info "Integer overflow" {:fn "negate-exact"}))
    (- a)))