Function: math[padzero] - adds trailing zeros

Calling Sequence:

padzero(z, p);

Parameters:

z - a numeric
p - an integer

Description:

padzero adds trailing zeros to a float or integer.

The first argument z is the object to be padded.

The second argument p is the fractional length of the resulting float.

If z is of type fraction , then z will be returned unchanged.

If the fractional length of z is equal or greater than p, then z will be returned unchanged.

This function is part of the math package, and so can be used only after performing the command with(math) or with(math, padzero).

Examples:

> with(math):

> padzero(1, 2);

[Maple Math]

> padzero(-2.51, 4);

[Maple Math]

> padzero(1/2, 2);

[Maple Math]

See Also:

math/cutzeros , math/slice , math/roundf .

Version History:

Version 1.0 - August 11, 1999