I dealing with data with very large numbers this error appears for example if I am trying to calculate for example:
import random
import numpy as np
import cmath
import math
import mpmath
from scipy.special import gamma, factorial
A= 11.6 ** 422.5
RuntimeWarning: overflow encountered in double_scalars
the output is inf
I tried to use
A= np.float128(11.6 ** 422.5)
to store the number but is said that id does not work fo windows
can any body please provide a solution store this value instead of giving inf
You might use
decimal.Decimalfor that purposegives output
decimalis part of standard library.