UNPKG

locutus

Version:

Locutus other languages' standard libraries to JavaScript for fun and educational purposes

17 lines (16 loc) 541 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.log10 = log10; function log10(x) { // discuss at: https://locutus.io/python/log10/ // parity verified: Python 3.12 // original by: Kevin van Zonneveld (https://kvz.io) // note 1: Returns the base-10 logarithm of x // example 1: log10(1) // returns 1: 0 // example 2: log10(10) // returns 2: 1 // example 3: log10(100) // returns 3: 2 return Math.log10(x); }