Skip to content

Commit 0b8882e

Browse files
Merge pull request #494 from keymone/fix/exp10-osx
define exp10 using pow
2 parents 967601d + 6e9ec11 commit 0b8882e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pixie/math.pxi

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
(ns pixie.math
2-
(:require [pixie.ffi-infer :as i]))
2+
(:require [pixie.ffi-infer :as i]
3+
[pixie.string :as s]))
34

45
(i/with-config {:library "m"
56
:cxx-flags ["-lm"]
@@ -45,7 +46,8 @@
4546

4647
(i/defcfn exp)
4748
(i/defcfn exp2)
48-
(i/defcfn exp10)
49+
(if-not (s/starts-with? pixie.platform/name "darwin")
50+
(i/defcfn exp10))
4951
(i/defcfn expm1)
5052

5153
(i/defcfn log)
@@ -94,3 +96,6 @@
9496

9597
(i/defcfn erf)
9698
(i/defcfn erfc))
99+
100+
(if (s/starts-with? pixie.platform/name "darwin")
101+
(defn exp10 [x] (pow 10.0 x)))

0 commit comments

Comments
 (0)