decimal module comes in handy.
>>> from decimal import *
>>> getcontext().prec = 100
>>> Decimal(2).sqrt()
Decimal('1.414213562373095048801688724209698078569671875376948073176679737990732478462107038850387534327641573')
More Related Contents:
- Fastest way to list all primes below N
- Sieve of Eratosthenes – Finding Primes Python
- Python math is wrong [duplicate]
- Integer square root in python
- Convert a number range to another range, maintaining ratio
- How can I convert radians to degrees with Python?
- C and Python – different behaviour of the modulo (%) operation
- Algorithm to find which number in a list sum up to a certain number
- How to make scipy.interpolate give an extrapolated result beyond the input range?
- Round float to x decimals?
- Python and Powers Math
- Python: sort function breaks in the presence of nan
- Euclidean algorithm (GCD) with multiple numbers?
- Can someone explain this: 0.2 + 0.1 = 0.30000000000000004? [duplicate]
- Python Math – TypeError: ‘NoneType’ object is not subscriptable
- How to get all combination of n binary value? [duplicate]
- Linear regression of arrays containing NANs in Python/Numpy
- Is cube root integer?
- Multiple variables in SciPy’s optimize.minimize
- Rotate point about another point in degrees python
- Python floating-point math is wrong [duplicate]
- Computing Standard Deviation in a stream
- Inaccurate Logarithm in Python
- How to pad a string with leading zeros in Python 3 [duplicate]
- What’s the simplest way to extend a numpy array in 2 dimensions?
- Calculating the angle between two vectors in Python
- Rounding floats so that they sum to precisely 1
- How do you get the next value in the floating-point sequence? [duplicate]
- Why is numpy.prod() incorrectly returning negative results, or 0, for my long lists of natural numbers?
- math.sin incorrect result