Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Math::BaseArith 1.00

    Download button

    No screenshots available
    Downloads: 346  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Gary Puckering | More programs
    Perl Artistic License / FREE
    July 20th, 2007, 10:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Math::BaseArith description

    A Perl extension for mixed-base number representation (like APL encode/decode).

    Math::BaseArith is a Perl extension for mixed-base number representation (like APL encode/decode).

    SYNOPSIS

    use Math::BaseArith;
    encode( value, base_list );
    decode( representation_list, base_list );


    The inspiration for this module is a pair of functions in the APL programming language called encode (a.k.a. "representation") and decode (a.k.a. base-value). Their principal use is to convert numbers from one number base to another. Mixed number bases are permitted.

    In this perl implementation, the representation of a number in a particular number base consists of a list whose elements are the digit values in that base. For example, the decimal number 31 would be expressed in binary as a list of five ones with any number of leading zeros: [0, 0, 0, 1, 1, 1, 1, 1]. The same number expressed as three hexadecimal (base 16) digits would be [0, 1, 15], while in base 10 it would be [0, 3, 1]. Fifty-one inches would be expressed in yards, feet, inches as [1, 1, 3], an example of a mixed number base.

    In the following description of encode and decode, Q will mean an abstract value or quantity, R will be its representation and B will define the number base. Q will be a perl scalar; R and B are perl lists. The values in R correspond to the radix values in B.

    In the examples below, assume the output of print has been altered by setting $, = ' ' and that => is your shell prompt.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    number representation | APL encode | APL decode | Math | number | representation

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM