Transformation of the "exact" values to float64() gives a "garbage" after the 16th significant digit (decimal places)
For example, the calculation "1/3"
import mpmath as mpm
import numpy as np
ma = mpm.mpf('1.')
mb = mpm.mpf('3.')
me = ma/mb
'{0:.33e} {1:.33e} {2:.33e}'.format(np.float64(ma),np.float64(mb),np.float64(me))
'1.000000000000000000000000000000000e+00 3.000000000000000000000000000000000e+00 3.333333333333333148296162562473910e-01'
How to set the number of actually calculated decimal places in numpy
Thank you