From e21a872b0dcbca2e7ea8311d9b54f709876d1848 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Mon, 15 Jun 2015 17:19:25 -0700 Subject: Implement log10 and 10^x math functions --- threads.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'threads.js') diff --git a/threads.js b/threads.js index 165ad0e..61b5722 100644 --- a/threads.js +++ b/threads.js @@ -2122,14 +2122,14 @@ Process.prototype.reportMonadic = function (fname, n) { case 'ln': result = Math.log(x); break; - case 'log': - result = 0; + case 'log': // base 10 + result = Math.log(x) / Math.LN10; break; case 'e^': result = Math.exp(x); break; case '10^': - result = 0; + result = Math.pow(10, x); break; default: nop(); -- cgit v1.3.1