evalhf/procedure - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Resource Management : evalhf : evalhf/procedure

evalhf/procedure

handling of Maple procedures

Description

• 

The evalhf command recognizes many ``system'' functions which are made available through the C library. See evalhf[fcnlist] for more information on this topic.

• 

A Maple procedure can be executed by evalhf subject to the following limitations:

• 

All the arguments to the procedure must evaluate to floats, arrays of floats, hfarrays, procedures, undefined, or infinity.

• 

The procedure can have at most 500 local variables, and can be called with at most 50 arguments (actual parameters).

• 

All the intermediate steps of computation inside the procedure must evaluate to floats, complex floats, arrays of floats, hfarrays, datatype=float[8] or datatype=complex[8] rtables, procedures, undefined, or infinity. Similarly, all variables referenced inside the procedure must evaluate to one of these data types.

• 

Global variables can be read, but cannot be assigned. Lexically scoped variables cannot be used anywhere in evalhf.

• 

Some constants can be used without definition. See evalhf[constant] for more information.

• 

Functions returning no value, or NULL, will return undefined in evalhf.

• 

Procedures with option remember will be searched for existing "remembered" values, but newly computed results from within evalhf will not be added to the remember table.  Note that the search will be done with HFloat arguments so evalhf will require f1.0:=1 in order for evalhf(f(1)) to actually find a value in the remember table.

• 

Other procedure options are not effective (including option trace). High settings of printlevel will not cause tracing of the statements executed under evalhf.

• 

All Maple statements are effective, provided they do not generate a symbolic structure.  However, the for ... in construct cannot be used. For-loop variables iterate as usual but using floats.

• 

Arrays are treated specially.  See evalhf[array] for more information.

• 

The type procedure is treated specially for compatibility with the rest of Maple.

• 

The op procedure is useless as there are no symbolic structures. In particular, it is ineffective in picking up parts of floating-point numbers (as opposed to standard Maple).

• 

No garbage collection happens during an evalhf call. None is needed, as evalhf uses almost no memory.

• 

Within a procedure being executed by evalhf, an evaluation can be forced to occur outside the evalhf environment by calling the eval procedure. Everything within the argument sequence to eval is evaluated in symbolic mode (that is, using symbols, integers, and software floating-point values). The result of the evaluation is converted back to a hardware float or array thereof. If this is not possible, an exception is raised.

See Also

evalhf

evalhf[array]

evalhf[constant]

evalhf[fcnlist]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam