Close
Close window
Tolerance - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

Introduction to the Tolerances Package

Calling Sequence

with(Tolerances)

Description

The Tolerances package provides an environment to perform computations with quantities involving tolerances.

Usage

After issuing the with(Tolerances) command, quantities involving tolerances can now be entered using a natural notation and any computations involving such quantities will return a value with the associated tolerance result.

The Tolerances package uses interval arithmetic to perform its computations.

Entering Tolerances

Tolerances are entered by specifying the value, followed by the (absolute) tolerance, separated by a plus/minus (±) sign. To enter a plus/minus sign:

Use the palettes. See View>Palettes>Common Symbols. (Standard Worksheet interface only)

Use symbol completion. Enter plusmn, and then press Esc. (Standard Worksheet interface 2-D input only) For more information, see symbol completion .

Enter &+-.

>

with(Tolerances):

>

a := 2 &+- 0.1;

a2.000±0.100

(1)
>

r := (Pi/2) &+- 0.2;

r1.571±0.200

(2)

Note: The plus/minus operator takes precedence over most operators, like ^ and *. As a result, parentheses are required around any non-atomic expression for a nominal value or a tolerance value. For more information, see operators/precedence .

Computing with Tolerances

In addition to simple arithmetic, the following functions can be used with Tolerances:

>

with(Tolerances):

>

a := 2 &+- 0.1;

a2.000±0.100

(3)
>

b := 3 &+- 0.05;

b3.000±0.050

(4)
>

a+b;

5.000±0.150

(5)
>

a*b;

6.005±0.400

(6)
>

a^b;

8.127±1.484

(7)
>

sin(a);

0.905±0.042

(8)
>

exp(1/b);

1.396±0.008

(9)

Displaying Tolerances

By default, the Tolerances package displays values with 3 digits even though computations are always performed at the precision indicated by the Digits variable. Use interface(displayprecision) to control the number of displayed digits.

>

interface(displayprecision=10);

−1

(10)
>

a := (1/3) &+- 0.1;

a0.3333333332±0.1000000000

(11)
>

interface(displayprecision=3);

10

(12)
>

a := (1/3) &+- 0.1;

a0.333±0.100

(13)

Nominal Value and Tolerance Value

The NominalValue command computes the nominal value of a quantity with a tolerance. The nominal value is the center of the confidence interval.

The ToleranceValue command computes the tolerance value of a quantity with a tolerance. The tolerance is the width of the confidence interval divided by two.

>

a := 2 &+- 0.1;

a2.000±0.100

(14)
>

b := 3 &+- 0.05;

b3.000±0.050

(15)
>

a+b;

5.000±0.150

(16)
>

NominalValue(a+b);

5.000

(17)
>

ToleranceValue(a+b);

0.150

(18)

Tolerances and Units

Tolerances and Units can be used together in the same computation

>

with(Units):

>

a := 150 &+- 10 * Unit(m);

a150.000±10.000m

(19)
>

b := 0.2 &+- 0.001 * Unit(km);

b0.200±0.001km

(20)
>

C := 2*a+2*b;

C700.000±22.000m

(21)
>

A := a*b;

A3.001×104±2.150×103m2

(22)
>


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /