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
Hardware Floating-point Numbers and Their Constructors
Calling Sequence
HFloat(M, E)
HFloat(M, E, base)
Parameters
M
-
expression
E
(optional) expression
base
(optional) 2 or default 10
Description
A hardware floating-point number (an object of type hfloat) is represented internally in Maple as a 64-bit IEEE binary floating-point value.
The HFloat(M, E) command can be used to construct the hardware floating-point number M * base^E.
If the mantissa parameter M is of type imaginary, HFloat(M, E) returns I * HFloat(Im(M), E).
If the mantissa is of type nonreal, HFloat(M, E) returns HFloat(Re(M), E) + I * HFloat(Im(M), E).
Maple also has arbitrary-precision software floating-point numbers, of type sfloat (see type[sfloat]), which can be constructed using the SFloat or Float constructor.
The maximum number of digits in the mantissa of a hardware float, and the maximum and minimum allowable exponents, can be obtained from evalhf (see evalhf[constant]).
To obtain the mantissa and exponent fields of a hardware float, use SFloatMantissa and SFloatExponent, respectively.
A hardware float, H, can be converted to a software float using SFloat(H). Similarly, a software float, S, can be converted to a hardware float using HFloat(S).
The presence of a hardware floating-point number in an expression generally implies that the computation will use hardware floating-point evaluation, unless the settings of Digits and UseHardwareFloats specify otherwise (see UseHardwareFloats).
An expression can be forced to evaluate entirely using hardware floating-point by enclosing it in a call to evalhf. However, some expressions, notably those involving data structures, cannot be evaluated by evalhf.
Entire procedures can be written to work using hardware floats without the restrictions imposed by evalhf by adding option hfloat to the procedure (see option_hfloat).
The number of digits carried in the mantissa for hardware floating-point arithmetic is approximately 15. More digits are displayed to ensure a base 10 representation from which the underlying binary hardware floating-point value can be reliably reconstructed.
Maple includes a variety of numeric functions to use with both hardware and software floating-point numbers.
CopySign
Default0
DefaultOverflow
DefaultUnderflow
denom
frem
ilog10
ilog2
Im
NextAfter
numer
NumericClass
OrderedNE
Re
Scale10
Scale2
SFloatExponent
SFloatMantissa
Unordered
The behaviors of hardware floating-point infinities, undefined values (so called "Not a Number", or "NaN", in IEEE nomenclature), and zero, are analogous to the corresponding software floating-point concepts. Please refer to Float for details.
Examples
See Also
constant, convert, Default0, Digits, evalf, integer, op, option_hfloat, SFloat, type, type/cx_infinity, type[float], type[hfloat], type[numeric], type[sfloat], UseHardwareFloats
Download Help Document