| Math::Base::Convert::CalcPP(3pm) | User Contributed Perl Documentation | Math::Base::Convert::CalcPP(3pm) |
Math::Base::Convert::CalcPP - standard methods used by Math::Base::Convert
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.
This function multiplies a long n*32 bit register by an integer < 65536
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.
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;
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;
Michael Robinton, michael@bizsystems.com
Copyright 2012-15, Michael Robinton
This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
| 2022-10-16 | perl v5.36.0 |