Ask Your Question

A basic question

asked 2013-04-29 04:17:01 +0100

assadabbasi gravatar image


I have a basic question. I don't know how to get the desired result. I am solving following problem.

f1 = exp((2*x1+1))^2/997383793764
f2 = exp((2*x2+2)^2/8726621367521)
f = f1*f2
d = f.substitute(x1=0,x2=0)

I get an answer in the form d = e^(89324832445632473/89327467832433434646786)

How can I convert my answer (e^(89324832445632473/89327467832433434646786)) to a rational number (P/Q) that don't involve any 'e'?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-04-29 04:55:12 +0100

Eviatar Bach gravatar image

It doesn't seem like that number is rational, so you cannot get an exact answer. However, you can get a rational that approximates it to some degree of error.

sage: RR(d).nearby_rational(max_error=1e-25)    
edit flag offensive delete link more

answered 2013-04-29 05:40:53 +0100

assadabbasi gravatar image

Thank You @Eviatar Bach

edit flag offensive delete link more


No problem!

Eviatar Bach gravatar imageEviatar Bach ( 2013-04-30 15:23:25 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-04-29 04:17:01 +0100

Seen: 339 times

Last updated: Apr 29 '13