

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to calculate natural log of a number in Python?
In the math module, two functions for calculation of logarithmic value are defined. The log() function returns natural logarithm of a number, whereas log10() calculates the standard loarithm i.e. to the base 10
The log() function takes two arguments, the number and base
import math print ("math.log(100.12) : ", math.log(100.12)) print ("math.log(100.72) : ", math.log(100.72)) print ("math.log(math.pi) : ", math.log(math.pi))
- Related Questions & Answers
- Find minimum number of Log value needed to calculate Log upto N in C++
- How to calculate square root of a number in Python?
- How to create a column of natural log in data frames stored in R list?
- C++ Program to Calculate Sum of Natural Numbers
- Java Program to Calculate the Sum of Natural Numbers
- How to make a log histogram in Python?
- Java Program to calculate Sum of squares of first n natural numbers
- How to calculate Power of a number using recursion in C#?
- How to calculate the ln of a given number in JavaScript?
- How to calculate the nth root of a number in JavaScript?
- C++ Program to Calculate Power of a Number
- Find all divisors of a natural number in java
- How to get the natural logarithm (base E) of a number in JavaScript?
- Python program to calculate the number of digits and letters in a string
- Python Program to Calculate the Number of Words and the Number of Characters Present in a String
Advertisements