12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5.4 Evaluation Rules • 195proc(x::algebraic)option‘Copyright (c) 1996 Waterloo Maple Inc. Al \l rights reserved .‘;if nargs ≠ 1 thenerror “expecting 1 argument, got %1”, nargselif type(x, ’complex(float)’) then evalf(’erfi ’(x))elif x = 0 then 0elif type(x, ’∞’) thenif type(x, ’cx_infinity’) then undefined + undefined ∗ Ielif type(x, ’undefined ’) thenNumericTools : −ThrowUndefined (x)elif type(x, ’extended _numeric’) then xelif type(R(x), ’∞’) then ∞ + ∞ ∗ Ielse CopySign(I, I(x))end ifelif type(x, ’undefined ’) thenNumericTools : −ThrowUndefined (x, ’preserve’ = ’axes’)elif type(x, ‘ ∗ ‘) and member(I, {op(x)}) then erf(−I ∗ x) ∗ Ielif type(x, ’complex(numeric)’) and csgn(x) < 0 then− erfi(−x)eliftype(x, ‘ ∗ ‘) and type(op(1, x), ’complex(numeric)’)and csgn(op(1, x)) < 0then − erfi(−x)elif type(x, ‘ + ‘) and traperror(sign(x)) = −1 then − erfi(−x)else ’erfi ’(x)end ifend procThe default value of verboseproc is 1.> interface( verboseproc=1 );The help page ?interface explains the possible settings of verboseprocand the other interface variables.One-Level EvaluationLocal variables of a procedure use one-level evaluation. That is, if youassign a local variable, then the result of evaluation is the value mostrecently assigned directly to that variable.> test:=proc()> local x, y, z;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!