Ask Your Question
0

A basic question

asked 2013-04-28 21:17:01 -0600

assadabbasi gravatar image

Hi,

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

var('x1','x2')
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
1

answered 2013-04-28 21:55:12 -0600

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)    
37/4994305074310
edit flag offensive delete link more
1

answered 2013-04-28 22:40:53 -0600

assadabbasi gravatar image

Thank You @Eviatar Bach

edit flag offensive delete link more

Comments

No problem!

Eviatar Bach gravatar imageEviatar Bach ( 2013-04-30 08:23:25 -0600 )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

Stats

Asked: 2013-04-28 21:17:01 -0600

Seen: 78 times

Last updated: Apr 28 '13