Math::Base::Convert::CalcPP3pm
Standard methods used by math::base::convert
Overview
This module contains the standard methods used by Math::Base::Convert to convert from one base number to another base number.
- •
-
$carry= addbaseno($reg32ptr,$int)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->useFROMbaseto32wideThis 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->use32wideTObaseThis 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;
Releases
5 releases since Debian 9 (Stretch); the text changed 2 times.