Ask Your Question

# A basic question

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 close merge delete

## 2 answers

Sort by » oldest newest most voted

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

more
more

## Your Answer

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

Add Answer

## Stats

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

Seen: 80 times

Last updated: Apr 28 '13