11.07.2015 Views

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6.4 Evaluation Rules • 205proc(x::algebraic)optionsystem, ‘Copyright (c) 1996 Waterloo <strong>Maple</strong>\Inc. All rights reserved .‘;try return _Remember(’procname’(args))catch :end try;if nargs ≠ 1 thenerror “expecting 1 argument, got %1”, nargselif type(x, ’complex(float)’) then evalf(’erfi ’(x))elif 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 ?interface help page 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 most

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

Saved successfully!

Ooh no, something went wrong!