Customizing the math package

Defaults for various math functions can be set by either assigning the global environment variables directly or by using the setdef function. This can be done even before the package is initialized, the package ini procedure does not overwrite already assigned environment variables; so preferrably, defaults may be set in the Maple initialization file . An example:

`maple.ini` (DOS) or `.mapleinit` (UNIX):

Point libname to the directory containing the math package:

> libname := `c:/maplev4/math`, libname:

Load the setdef function from the package to easily assign defaults:

> readlib(setdef):

Now set defaults using setdef:

> setdef(
vector, 'vertical',
fnull, numerator=true,
_MathDomain, -20 .. 20):

Set global math variables directly:

> _MathQuiet := true:

You may also load the math package table and execute math's initialization procedure by readlib'ing the file `math.m` from the math library so that you my use the long forms of the functions included in the package without having to load their short forms with with .

> readlib(math):

> `math/init`():

Alternatively, the package can be initialized either from the initialization file or in a Maple session:

> with(math):

You may check specific settings by querying their corresponding environment variables:

> _MathVector;

[Maple Math]

> fnullNumerator;

[Maple Math]

> _MathDomain;

[Maple Math]

> _MathQuiet;

[Maple Math]

back