enter image description here
i’d like to plot this graph of y but i’m getting overflow erroors
so i think my balues are too small and/or too big so i’d like to solve this calculation limit in regular python please.
<code>import numpy as np
from scipy import special as s
import matplotlib.pyplot as plt
from decimal import Decimal as dd
import numpy as np
from scipy.special import logsumexp as ll
x = np.linspace(0,10,1)
#x = np.array([1.0])
q2 = 2**0.5
q1 = (3/q2)*x+(39/q2)
#print(q1)
d = s.erfi(q1)
d2 = (np.e)**(-4.5*x**2-117*x)
d3 = np.e**(-1521/2)
d4 = ll(np.e**(q1**2-1521/2))
#d4 = pow(np.e,
d5 = (np.pi)**0.5
#let c = 0
y = ll((d2*(((178113*d3*d5*d)/q2)-(27*x**2-351*x+4570)*d4))**(-1/18))
plt.plot(x,y)
plt.xlabel('$x$')
plt.ylabel('$y$')
plt.show()
</code>
<code>import numpy as np
from scipy import special as s
import matplotlib.pyplot as plt
from decimal import Decimal as dd
import numpy as np
from scipy.special import logsumexp as ll
x = np.linspace(0,10,1)
#x = np.array([1.0])
q2 = 2**0.5
q1 = (3/q2)*x+(39/q2)
#print(q1)
d = s.erfi(q1)
d2 = (np.e)**(-4.5*x**2-117*x)
d3 = np.e**(-1521/2)
d4 = ll(np.e**(q1**2-1521/2))
#d4 = pow(np.e,
d5 = (np.pi)**0.5
#let c = 0
y = ll((d2*(((178113*d3*d5*d)/q2)-(27*x**2-351*x+4570)*d4))**(-1/18))
plt.plot(x,y)
plt.xlabel('$x$')
plt.ylabel('$y$')
plt.show()
</code>
import numpy as np
from scipy import special as s
import matplotlib.pyplot as plt
from decimal import Decimal as dd
import numpy as np
from scipy.special import logsumexp as ll
x = np.linspace(0,10,1)
#x = np.array([1.0])
q2 = 2**0.5
q1 = (3/q2)*x+(39/q2)
#print(q1)
d = s.erfi(q1)
d2 = (np.e)**(-4.5*x**2-117*x)
d3 = np.e**(-1521/2)
d4 = ll(np.e**(q1**2-1521/2))
#d4 = pow(np.e,
d5 = (np.pi)**0.5
#let c = 0
y = ll((d2*(((178113*d3*d5*d)/q2)-(27*x**2-351*x+4570)*d4))**(-1/18))
plt.plot(x,y)
plt.xlabel('$x$')
plt.ylabel('$y$')
plt.show()
had some error with getting y
New contributor
Da Az A is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3