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
Algebraic.evalhf - evaluate an Algebraic expression using hardware floating-point arithmetic
Calling Sequence
double evalhf() throws MapleException
Description
The evalhf function evaluates the Maple expression represented by the current Algebraic object using the Maple evalhf command. The result is returned as a double.
The current Algebraic object is unchanged by this call.
Not all Algebraic expressions can be evaluated using the Maple evalhf command. Algebraic objects representing expressions that cannot be evaluated raise a MapleException if evalhf is called.
Examples
import com.maplesoft.openmaple.*;
import com.maplesoft.externalcall.MapleException;
class Example
{
public static void main( String notused[] ) throws MapleException
String mapleArgs[];
Engine engine;
Algebraic a;
double r;
int i;
mapleArgs = new String[1];
mapleArgs[0] = "java";
engine = new Engine( mapleArgs, new EngineCallBacksDefault(),
null, null );
a = engine.evaluate( "1/sin(Pi*7/8):" );
r = a.evalhf();
System.out.println( a );
System.out.println( r );
}
Executing this code should produce the following output.
1/sin(1/8*Pi)
2.613125929752753
See Also
evalhf, ExternalCalling/Java/MapleException, OpenMaple, OpenMaple/Java/Algebraic, OpenMaple/Java/API, OpenMaple/Java/Engine/evaluate
Download Help Document