I am encountering the runtime overflow error in exp because it crosses the limit for 64 bits and I can't use np.float128() as I'm using a 64-bit windows computer.
I can clip and use it, but how do I clip for a complex number and still get an imaginary and complex parts.
Current code:
import numpy as np
x = 738.368295193386-738.368295193386j
x = np.clip(x, -709.78, 709.78)
print(np.exp(x))
Output is like this:
(1.7928227943945157e+308+0j)
But also want the imaginary term to have a value.
For example:
np.exp(708.368295193386+708.368295193386j)
is (-2.657182604727012e+306-4.3615140206566584e+307j)
How could I get a similar result with a value and the sign (+ -) maintained?