Go to the first, previous, next, last section, table of contents.

Symbolic Mode

Calculations are normally performed numerically wherever possible. For example, the calc-sqrt command, or sqrt function in an algebraic expression, produces a numeric answer if the argument is a number or a symbolic expression if the argument is an expression: 2 Q pushes 1.4142 but ' x+1 RET Q pushes `sqrt(x+1)'.

In symbolic mode, controlled by the m s (calc-symbolic-mode) command, functions which would produce inexact, irrational results are left in symbolic form. Thus 16 Q pushes 4, but 2 Q pushes `sqrt(2)'.

The shift-N (calc-eval-num) command evaluates numerically the expression at the top of the stack, by temporarily disabling calc-symbolic-mode and executing = (calc-evaluate). Given a numeric prefix argument, it also sets the floating-point precision to the specified value for the duration of the command.

To evaluate a formula numerically without expanding the variables it contains, you can use the key sequence m s a v m s (this uses calc-alg-evaluate, which resimplifies but doesn't evaluate variables.)


Go to the first, previous, next, last section, table of contents.