Ask Your Question

# Symbolic math problem

asked 2015-01-11 11:18:01 -0500

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I need find in sage numberic value of expression like

s=cos(99.9500000000000*pi + 199.900000000000*pi*real_part(sgn(sin(49.9750000000000*pi))))*e^(-199.900000000000*pi*imag_part(sgn(sin(49.9750000000000*pi)))) + 1


but s.n() gives error "TypeError: cannot evaluate symbolic expression numerically". How to resolve this problem?

edit retag close merge delete

## 1 answer

Sort by » oldest newest most voted

Use RDF.pi() instead of pi.

sage: pi = RDF.pi()
sage: s = cos(99.9500000000000*pi + 199.900000000000*pi*real_part(sgn(sin(49.9750000000000*pi))))*e^(-199.900000000000*pi*imag_part(sgn(sin(49.9750000000000*pi)))) + 1
sage: s
1.98768834059514

more

## Comments

Thanks. Now it works

( 2015-01-11 11:44:49 -0500 )edit

## Your Answer

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

Add Answer

## Stats

Asked: 2015-01-11 11:18:01 -0500

Seen: 57 times

Last updated: Jan 11 '15