Implement log10 and 10^x math functions

pull/3/merge
Michael Ball 2015-06-15 17:19:25 -07:00
rodzic 3885ced35a
commit e21a872b0d
2 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -1111,9 +1111,9 @@ SyntaxElementMorph.prototype.labelPart = function (spec) {
acos : ['acos'],
atan : ['atan'],
ln : ['ln'],
// log : 'log',
'e^' : ['e^']
// '10^' : '10^'
log : ['log'],
'e^' : ['e^'],
'10^' : ['10^']
},
true
);

Wyświetl plik

@ -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();