Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
Procedure.executehf - execute a Maple procedure using hardware floats
Calling Sequence
double executehf( ) throws MapleException
double executehf( double args[] ) throws MapleException
Parameters
args
-
array of doubles to be used as arguments to the procedure
Description
The executehf function executes the procedure represented by the Procedure object with the given arguments using hardware floats.
Not all procedures can be executed using hardware floating-point. For information on the restrictions on functions evaluating using the hardware floating-point system, see evalhf/procedure. For more information on the Maple hardware floating-point evaluation system, see evalhf.
Examples
import com.maplesoft.openmaple.*;
import com.maplesoft.externalcall.MapleException;
class Example
{
public static void main( String notused[] ) throws MapleException
String mapleArgs[];
Engine engine;
Procedure p;
double args[];
mapleArgs = new String[1];
mapleArgs[0] = "java";
engine = new Engine( mapleArgs, new EngineCallBacksDefault(),
null, null );
p = (Procedure)engine.evaluate( "proc( ) return Pi; end proc:" );
System.out.println( p.execute() );
System.out.println( p.executehf() );
p = (Procedure)engine.evaluate( "proc( x,y,z ) return (x+y)/z; end proc:" );
args = new double[3];
args[0] = 100;
args[1] = 900;
args[2] = 15.0;
System.out.println( p.executehf( args ) );
p = (Procedure)engine.evaluate( "proc( x ) return sin(Pi*x); end proc:" );
args = new double[1];
args[0] = 1000;
}
Executing this code produces the following output.
Pi
3.141592653589793
66.66666666666667
-3.214166459275633E-13
See Also
ExternalCalling/Java/MapleException, OpenMaple, OpenMaple/Java/Algebraic, OpenMaple/Java/API, OpenMaple/Java/Procedure, OpenMaple/Java/Procedure/execute
Download Help Document