Math::B...::CalcPP(3)

πŸ’– NAME πŸ’–

Math::Base::Convert::CalcPP β€” bestie, this is the module that holds all the standard methods that Math::Base::Convert leans on to do its thing. 🫢

It ships as part of the User Contributed Perl Documentation collection, and yes it's Math::B...::CalcPP(3) if you're looking at the manual page itself. ✨


✨ DESCRIPTION ✨

So like, this module is literally just a little backstage crew. It contains the standard methods that Math::Base::Convert uses to convert a number in one base into a number in another base. No drama, just math. πŸ’…

  • $carry = addbaseno($reg32ptr,$int) β€” this function adds an integer that's less than 65536 to a long n*32 bit register, and hands you back the carry. That's it, that's the whole vibe. πŸŽ€
  • multiply($reg32ptr,$int) β€” this one multiplies a long n*32 bit register by an integer less than 65536. Iconic behavior honestly. πŸ”₯
  • ($qptr,$remainder) = dividebybase($reg32ptr,$int) β€” this function divides a long n*32 bit register by an integer less than 65536, and returns a pointer to a long n*32 bit quotient plus an integer remainder. Two-for-one, we love a multitasker. πŸ‘‘
  • $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 β€” and 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;
not me reading those snippets like a bedtime story πŸ“ β€” copy them exactly if you're playing along at home, bestie, the code is the code.

πŸ‘‘ AUTHOR πŸ‘‘

Michael Robinton, michael@bizsystems.com β€” shoutout to the dev, no cap. 🌸


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. πŸ’€ (fr fr, that part matters, don't skip it.)


okay that's the whole page bestie, you ate that 🫢 β€” this lil' manual page came to you courtesy of perl v5.42.0, dated 2025-09-16, and yes it's still giving Math::B...::CalcPP(3) energy. periodt. πŸ’–βœ¨πŸŒˆ

πŸ“¦ where this page comes from