summaryrefslogtreecommitdiff
path: root/generic/include/clc/math/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/include/clc/math/log.h')
-rw-r--r--generic/include/clc/math/log.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/include/clc/math/log.h b/generic/include/clc/math/log.h
new file mode 100644
index 0000000..644f857
--- /dev/null
+++ b/generic/include/clc/math/log.h
@@ -0,0 +1,4 @@
+#undef log
+
+// log(x) = log2(x) * (1/log2(e))
+#define log(val) (__clc_log2(val) * 0.693147181f)