Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
evalhf/fortran - 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.
Download Help Document