Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Math Module log() Function in python

>>> import math
>>> math.log(10, 1000)
0.33333333333333337
Comment

logarithms python

import math
#E.g log_2(8) 
result = math.log(8,2)
Comment

python how to use logarithm

//Logarithm Functions

print(math.log(10))
print(math.log(10, 10))
Comment

Math Module log10() Function in python

>>> import math
>>> math.log10(10000)
4.0
Comment

log in python

def log(x,base):
    result = ln(x)/ln(base)
    return result

def ln(x):
    n = 100000.0
    return n * ((x ** (1/n)) - 1)

print(log(2,4))

#code by fawlid
Comment

PREVIOUS NEXT
Code Example
Python :: matplotlib.pyplot 
Python :: how to use a for loop in python 
Python :: how to add to a list python 
Python :: sklean tfidf 
Python :: discordpy make all inputs lowercase 
Python :: pandas disply options 
Python :: python class destroying 
Python :: python newline 
Python :: pandas series add word to every item in series 
Python :: complete dates pandas 
Python :: how to do merge sort in python 
Python :: python loop with index 
Python :: python eliptic curve matplotlib 
Python :: limpar idle python 
Python :: usign signal files django 
Python :: assert keyword in python 
Python :: Using emoji Modules in Python 
Python :: mosaicplot pandas 
Python :: element not interactable headless chrome 
Python :: how to sort in python 
Python :: create django app 
Python :: DateEntry tkinter 
Python :: python array linspace 
Python :: python append list to list 
Python :: how to looks like a hacker 
Python :: python init dict by list 
Python :: spacy import doc 
Python :: python get previous method name 
Python :: how to print an index in python 
Python :: DJANGO model instance get by variable 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =