UNSW   Faculty of Engineering PRINT VERSION SITE MAP  
cse | School of Computer Science and Engineering (CRICOS Provider No. 00098G)
    #About CSE     #Undergraduate Study     #Postgraduate Study     #Timetables & Courses     #Research & Publications     #People & Work Units     #Help & Resources     #News & Events     #High School Portal

Last updated 28.09.06

PREV UP NEXT GNU Emacs Calc 2.02 Manual

7.4.5: 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.)

Top Of Page

 ###
Site maintained by webmistress@cse.unsw.edu.au
Please read the UNSW Copyright & Disclaimer Statement