mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 01:03:18 +08:00
Fix issue LOG function in formulaJs library [SCI-9556] (#6481)
This commit is contained in:
parent
f83f5a8b58
commit
7050e11225
1 changed files with 1 additions and 2 deletions
3
vendor/assets/javascripts/formula.js
vendored
3
vendor/assets/javascripts/formula.js
vendored
|
@ -884,11 +884,10 @@ exports.LOG2E = function() {
|
|||
|
||||
exports.LOG = function(number, base) {
|
||||
number = utils.parseNumber(number);
|
||||
base = utils.parseNumber(base);
|
||||
base = (base === undefined) ? 10 : utils.parseNumber(base);
|
||||
if (utils.anyIsError(number, base)) {
|
||||
return error.value;
|
||||
}
|
||||
base = (base === undefined) ? 10 : base;
|
||||
return Math.log(number) / Math.log(base);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue