diff options
| author | Jens Mönig <jens@moenig.org> | 2015-06-25 15:32:22 +0200 |
|---|---|---|
| committer | Jens Mönig <jens@moenig.org> | 2015-06-25 15:32:22 +0200 |
| commit | 4707169519b0d7b5f41fff46bb5c7e25a36bc498 (patch) | |
| tree | 7d57ecb2e918a78faa607327e673cc8bf282d575 /threads.js | |
| parent | f4ff1056eae012b9a257c7dea88af3d007012632 (diff) | |
| parent | e21a872b0dcbca2e7ea8311d9b54f709876d1848 (diff) | |
| download | snap-4707169519b0d7b5f41fff46bb5c7e25a36bc498.tar.gz snap-4707169519b0d7b5f41fff46bb5c7e25a36bc498.zip | |
Merge pull request #834 from cycomachead/number-functions
Implement log10 and 10^x math functions
Diffstat (limited to 'threads.js')
| -rw-r--r-- | threads.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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(); |
