pub-3785248829033902 | Python: Import Math | - Big data with Python

| Python: Import Math |

The math module implements many of the IEEE functions that would normally be found in the native platform C libraries for complex mathematical operations using floating point values, including logarithms and trigonometric operations.



The best way to learn new things is to take a practical approach of the things you want to learn. Here is a fragment of code that demonstrates the use of math statement in Python:

Æ’ python command

import math

print ' π: %.30f' % math.pi
print 'e: %.30f' % math.e

output

Ï€: 3.141592653589793115997963468544
e: 2.718281828459045090795598298428


Previous
Next Post »