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

Online Help

All Products    Maple    MapleSim


verify/float

verify the equality of two floats

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

verify(expr1, expr2, float(n))

verify(expr1, expr2, float(n, opt1, opt2, ...))

Parameters

expr1, expr2

-

expressions

n

-

non-negative

opt1, opt2, ...

-

options passed to testfloat

Description

• 

The verify(expr1, expr2, float(n)) calling sequence returns testfloat(expr1, expr2, n).

• 

The verify(expr1, expr2, float(n, opt1, opt2, ...)) calling sequence returns testfloat(expr1, expr2, n, opt1, opt2, ...).

• 

See testfloat for information regarding the options and how the result is determined.

• 

This verification is not symmetric, as expr2 = 0 causes an absolute error test to be applied by default.

Examples

> 

evalb⁡0.2342351243=0.2342351245

false

(1)
> 

verify⁡0.2342351243,0.2342351245,float⁡2

true

(2)
> 

verify⁡0.2342351243,0.2342351256,float⁡2

false,13.,ulps

(3)
> 

verify⁡0.2342351243,0.2342351256,truefalse⁡float⁡2

false

(4)
> 

verify⁡1.234⁢x2+3.114⁢x−2.592,1.235⁢y2−2.591+3.114⁢y,float⁡1,digits=4

true

(5)

The first returns an error because select expects a result of type truefalse:

> 

select⁡verify,12.53236,12.53245,12.5348,12.5351,12.534,float⁡150000.

Error, invalid boolean expression: [false, .164e6, `ulps `]

> 

select⁡verify,12.53236,12.53245,12.5348,12.5351,12.534,truefalse⁡float⁡150000.

12.5348,12.5351

(6)

See Also

float

testfloat

type/nonnegative

verify

verify/truefalse