fortran - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


evalhf/fortran

evalhf and its relation to Fortran

Description

• 

Typically a Fortran program or a set of functions can be easily converted into a Maple function which can be executed by evalhf. The speed of a function executed by evalhf compared to a function compiled in optimized Fortran is on a ratio anywhere between 1:5 to 1:50. Converting Fortran into Maple-evalhf is still one or two orders of magnitude faster than running the equivalent code under standard Maple.

• 

The Whetstone benchmark gives a ratio of 1:35 in favor of compiled Fortran (under a VAX running Unix BSD 4.3).

• 

The following differences and problems should be observed when converting Fortran into Maple-evalhf:

• 

The only type handled by evalhf is floating point (double precision). Integers and Booleans are treated as floats also.

• 

There is no equivalent of the common or equivalence statements.

• 

Any Fortran expression which will evaluate over the integers, in particular expressions assigned to integer variables, should be surrounded by the function trunc().

• 

Array declarations are dynamic with the array() function, and not static.

• 

All variables should be declared as local variables.

• 

Fortran may return values through assigned arguments. This will not work under evalhf. Arrays with a single element may solve this problem.

• 

Fortran is very liberal with the array dimensions and will allow a subroutine to work with an array that has a declaration different from the caller. This is not allowed in Maple-evalhf; furthermore, arrays can only be passed as a whole, not just by the mention of a single element.

• 

Returned values in Maple are the last value computed. In Fortran these values are assigned to a variable with the same name as the function.

• 

There is neither a read nor format statement.

See Also

evalhf