I need to evaluate a product of two real functions, namely $F(x)\cdot G(x)$. The function $F(x)$ is a diverging and obscure member of scipy.special, while $G(x)$ is a gaussian. While the product is a well behaved function and of order ~1, its factors by themselves, for x range that I am interested in, are of order $10^{\pm 500}$. My problem is that each of them overflow pythons float. My go-to move is to try numpy.float128 which would cover range of interest quite nicely, if not for the error:
TypeError: ufunc 'pbdv' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
So, function $F$ doesn't support float128. Is there a well known path to deal with this? Only thing I can think of right now is to express offending function as power series and calculate Cauchy product of sums - would that work?
scipy.special" specifically? – njuffa Aug 27 '22 at 08:28