math there is theoretically no limit to the precision you can usebut the higher the precisionthe more memory is required and the slower things will run in generaleven with small precisionsdecimal objects are slower than floating point numbers ordinary floating point arithmetic is enough for most problemsbut it is nice to know that you can get higher precision if you ever need it there is lot more to the decimal module see the python documentation [ complex numbers python has data type for complex numbers in mathwe have - the number is called an imaginary number complex number is number of the form bi where and are real numbers the value is called the real partand is the imaginary part in electrical engineeringthe symbol is used in place of and in python is used for imaginary numbers here are couple of examples of creating complex numbersx complex( if number ends in or jpython treats it as complex number complex numbers have methods real(and imag(which return the real and imaginary parts of the number the conjugate method returns the complex conjugate (the conjugate of bi is bi the cmath module contains many of the same functions as the math moduleexcept that they work with complex arguments the functions include regularinverseand hyperbolic trigonometric functionslogarithms and the exponential function it also contains two functionspolar and rectfor converting between rectangular and polar coordinatescmath polar( jcmath rect( ( ( - + jcomplex numbers are fascinatingthough not all that useful in day-to-day life one nice applicationhoweveris fractals here is program that draws the famous mandelbrot set the program requires the pil and python or from tkinter import from pil import imageimagetkimagedraw def color_convert(rgb)return '#{ : }{ : }{ : xformat(int( * ),int( * )int( * )max_iter=