The UseHardwareFloats Environment Variable - Maple Programming Help

Home : Support : Online Help : Mathematics : Numerical Computations : Maple Numerics : Environment Variables : UseHardwareFloats

The UseHardwareFloats Environment Variable

 Calling Sequence UseHardwareFloats := flag

Parameters

 flag - true, false, or deduced

Description

 • The UseHardwareFloats environment variable controls whether Maple's hardware or software floating-point computation environment is used to perform floating-point operations when there are hardware floating-point values present in the expression being evaluated.
 • This environment variable has influence only over computations done on expressions containing hardware floats (see HFloat) or hardware floating-point rtables (Arrays, Matrices and Vectors; see rtable).
 • The setting of UseHardwareFloats is also honored inside procedures that have option hfloat.
 • The default value of UseHardwareFloats is deduced. The value deduced tells Maple to deduce the computation environment (hardware or software) from the current setting of the Digits environment variable: if Digits <= evalhf(Digits), then hardware float computation is allowed; otherwise, the computation is performed using software floats.
 • If UseHardwareFloats is set to true, hardware float computation is always allowed (so long as the expression contains hardware floating-point values of rtables of such, or the expression appears within a procedure having option hfloat).
 • A false setting of UseHardwareFloats disallows hardware floating-point computations in all contexts except within the evalhf environment. Any hardware float values appearing in expressions are first converted into software floats before operations are performed.
 • The value of UseHardwareFloats can be  changed by using the assignment operator.

Examples

 > $\mathrm{UseHardwareFloats},\mathrm{Digits}$
 ${\mathrm{deduced}}{,}{10}$ (1)
 > $\mathrm{sin}\left(\mathrm{HFloat}\left(1.\right)\right)$
 ${0.841470984807897}$ (2)
 > $\mathrm{Digits}≔25:$
 > $\mathrm{sin}\left(\mathrm{HFloat}\left(1.1\right)\right)$
 ${0.8912073600614353807754535}$ (3)
 > $\mathrm{UseHardwareFloats}≔\mathrm{true}:$
 > $\mathrm{sin}\left(\mathrm{HFloat}\left(1.2\right)\right)$
 ${0.932039085967226}$ (4)
 > $\mathrm{Digits}≔10:$
 > $\mathrm{UseHardwareFloats}≔\mathrm{false}:$
 > $\mathrm{sin}\left(\mathrm{HFloat}\left(1.3\right)\right)$
 ${0.9635581854}$ (5)