Writing simple arithmetic expressions and performing basic math operations
basic arithmetic operators are + add, - subtract, asterisk multiply, / divide. Multiplication is NEVER implied! You must use the asterisk.
Make heavy use of parentheses especially when creating fractions! If you want to compute , enter this:
To do square roots, use the syntax, sqrt(). For higher roots, use fractional exponents
Can we get sage to write the last result using a radical sign? Answer: Any time we want to see a pretty answer, we use the show() command, by wrapping your entire calculation in parentheses. Take f'rinstance our last expression.
no radical sign, but it still looks prettier.
I wonder what sage does if you ask it to do an even root if a negative number?
Sometimes you might want SAGE to round. Here's one way:
Another way to approximate is the function, numerical_approx(). Use it like this: