Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to evaluate and simplify symbolic equations with some numbers?

This is my worksheet:

https://cocalc.com/share/f7766c5e-2f4d-4916-bb0d-74a7182e5fd5/2019-02-09-203517.sagews?viewer=share

I use RIF representations of numbers, and want to insert some values into my symbolic equation, in order to get a better idea of the error bars i might face.

so i try to do something like

show(n(d[0].subs(
        d_e == RIF(.999,1.001),
        x ==.25,
        d_m == RIF(.05,.15),
        U == RIF(10^-9,1.02*10^-9),
        e_m == e_0 * RIF(80.5,81.5),
        e_s == e_0 * RIF(3,4)
    )
    )
)

and get this:

Error in lines 29-37
Traceback (most recent call last):
  File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1188, in execute
    flags=compile_flags) in namespace, locals
  File "<string>", line 4
SyntaxError: non-keyword arg after keyword arg

how do i do this porperly?