Michael Robinton > Math-Base-Convert-0.08 > Math::Base::Convert::CalcPP
Module Version: 0.02

# NAME

Math::Base::Convert::CalcPP

# DESCRIPTION

This module contains the standard methods used by Math::Base::Convert to convert from one base number to another base number.

This function adds an integer < 65536 to a long n*32 bit register and returns the carry.

• multiply(\$reg32ptr,\$int)

This function multiplies a long n*32 bit register by an integer < 65536

• (\$qptr,\$remainder) = dividebybase(\$reg32ptr,\$int)

this function divides a long n*32 bit register by an integer < 65536 and returns a pointer to a long n*32 bit quotient and an integer remainder.

• \$bc->useFROMbaseto32wide

This method converts FROM an input base string to a long n*32 bit register using an algorithim like:

```        \$longnum = 0;
for \$char ( \$in_str =~ /./g ) {
\$longnum *= \$base;
\$longnum += \$value{\$char)
}
return \$number;```
• \$output = \$bc->use32wideTObase

This method converts a long n*32 bit register TO a base number using an algorithim like:

```    \$output = '';
while( \$longnum > 0 ) {
\$output = ( \$longnum % \$base ) . \$output;
\$num = int( \$longnum / \$base );
}
return \$output;```

# AUTHOR

Michael Robinton, michael@bizsystems.com