STINNER Victor added the comment:
The math module uses the float type which has a limited precision: it's 64-bit
IEEE.
For better precision, you can use the decimal module which has configurable
precision.
Example:
---
import decimal
decimal.getcontext().prec = 5
root = decimal.Decimal('123'
New submission from Mick Press:
math.sqrt for very large numbers returns wrong value. Attached is screen shot
showing my sqrt function result and math.sqrt function result.
--
components: Windows
files: PyCuda - [C__Users_mick_PyScripts_PyCuda] -
C__Users_mick_.PyCharmCE2017.2_config_s