Back
acos (clj)
(source)function
(acos a)
Returns the arc cosine of a, in the range 0.0 to pi.
If a is ##NaN or |a|>1 => ##NaN
See: https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#acos-double-
Examples
clojure
(ns clojure.test-clojure.math
(:require
[clojure.test :refer :all]
[clojure.math :as m]))
(deftest test-acos
(is (NaN? (m/acos ##NaN)))
(is (NaN? (m/acos -2.0)))
(is (NaN? (m/acos 2.0)))
(is (ulp= (* 2 (m/acos 0.0)) m/PI 1)))