6  Fast Math

(ns stats-with-clojure.fast-math
  (:require
   [scicloj.kindly.v4.api :as kindly]
   [scicloj.kindly.v4.kind :as kind]
   [fastmath.core :as fc]))

6.1 What is Fast Math?

https://github.com/generateme/fastmath

why use it?

speed

tested libraries

constants

trig functions

(fc/abs -1)
1.0
(fc/sqrt 9)
3.0
(fc/sin 0.5)
0.47942553860420295
(fc/sin (/ fc/PI 2))
1.0
(fc/exp 1)
2.7182818284590455
(fc/exp 5)
148.4131591025766
(fc/log 10)
2.302585092994046
(fc/log fc/E)
1.0
source: notebooks/stats_with_clojure/fast_math.clj