Add unchecked math

This commit is contained in:
Michiel Borkent 2022-04-03 21:38:56 +02:00
parent f1db01aede
commit db9a8ff10c
2 changed files with 3 additions and 0 deletions

View file

@ -31,6 +31,7 @@
(def command-line-args (core-dynamic-var '*command-line-args*))
(def warn-on-reflection (core-dynamic-var '*warn-on-reflection* false))
(def compile-files (core-dynamic-var '*compile-files* false))
(def unchecked-math (core-dynamic-var '*unchecked-math* false))
(def math-context (core-dynamic-var '*math-context*))
(defn read+string
@ -169,6 +170,7 @@
'*command-line-args* command-line-args
'*warn-on-reflection* warn-on-reflection
'*compile-files* compile-files
'*unchecked-math* unchecked-math
'*math-context* math-context
'with-precision (sci/copy-var with-precision clojure-core-ns)
'-with-precision (sci/copy-var -with-precision clojure-core-ns)

View file

@ -703,6 +703,7 @@ Use bb run --help to show this help output.
(defn exec [cli-opts]
(binding [*unrestricted* true]
(sci/binding [core/warn-on-reflection @core/warn-on-reflection
core/unchecked-math @core/unchecked-math
core/data-readers @core/data-readers
sci/ns @sci/ns]
(let [{version-opt :version