double - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


type/float

check for an object of type float

type/sfloat

check for an object of type sfloat

type/hfloat

check for an object of type hfloat

type/float[] and type/float[8]

check for an object of type float[] or float[8]

type/double

check for an object of type double

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

type(x, float)

type(x, sfloat)

type(x, hfloat)

type(x, float[])

type(x, float[8])

type(x, double)

Parameters

x

-

any expression

Description

• 

The type(x, sfloat) function returns true if x is a Maple software float. Otherwise, false is returned.

• 

The type(x, float[]), type(x, float[8]), type(x, double), and type(x, hfloat) functions return true if x is a Maple hardware float.

  

The "8" in float[8] refers to the number of bytes allocated for the hardware floating-point number.  Only double precision floats (8 bytes) are currently supported. The types float[], float[8], double, and hfloat are synonymous with one another.

• 

The type(x, float) function returns true if x is of type sfloat, hfloat, float[], float[8], or double.

• 

The type(x, double) function returns true if x is of type hfloat, float[], float[8], or double.

Examples

> 

type⁡12,float

false

(1)
> 

type⁡0.5,float

true

(2)
> 

type⁡0.5,sfloat

true

(3)
> 

type⁡0.5,hfloat

false

(4)
> 

half≔HFloat⁡.5

half≔0.500000000000000

(5)
> 

type⁡half,float

true

(6)
> 

type⁡half,sfloat

false

(7)
> 

type⁡half,hfloat

true

(8)
> 

type⁡String,float

false

(9)
> 

type⁡Name,float

false

(10)
> 

type⁡ab,float

false

(11)
> 

type⁡ab,float

false

(12)
> 

A≔Matrix⁡1,2,3,4,datatype=float8

A≔1.2.3.4.

(13)
> 

type⁡A,Matrix⁡float8

true

(14)
> 

type⁡A,Matrix⁡hfloat

true

(15)
> 

type⁡A,Matrix⁡double

true

(16)
> 

type⁡A,Matrix⁡sfloat

false

(17)

Compatibility

• 

The type/double command was introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

float

HFloat

rtable

sfloat

type

type/atomic

type/literal

type/numeric

UseHardwareFloats