"best" rational number library for Python?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • skip@pobox.com

    #1

    "best" rational number library for Python?

    A guy at work asked for functionality commonly found with rational numbers,
    so I said I'd find and install something. I figured gmpy would be suitable,
    alas I'm having trouble successfully building the underlying GMP 4.2.1
    library on a PC running Solaris 10 (won't compile with the default --host,
    fails "make check" if I go the no-assembly route). Before I invest a bunch
    of time into this, am I barking up the wrong tree?

    Performance is, for now, certainly not an issue. Even a pure Python
    rational number class would probably suffice.

    Thx,

    Skip
  • Paul Rubin

    #2
    Re: "best&quot ; rational number library for Python?

    skip@pobox.com writes:
    Performance is, for now, certainly not an issue. Even a pure Python
    rational number class would probably suffice.
    There are certainly some of those around, but I'm surprised there's a
    problem with GMP and Solaris.

    Comment

    • skip@pobox.com

      #3
      Re: "best&quot ; rational number library for Python?


      PaulThere are certainly some of those around, but I'm surprised
      Paulthere's a problem with GMP and Solaris.

      That was my thought as well.

      Skip

      Comment

      • casevh@comcast.net

        #4
        Re: "best&quot ; rational number library for Python?

        A guy at work asked for functionality commonly found with rational numbers,
        so I said I'd find and install something. I figured gmpy would be suitable,
        alas I'm having trouble successfully building the underlying GMP 4.2.1
        library on a PC running Solaris 10 (won't compile with the default --host,
        fails "make check" if I go the no-assembly route). Before I invest a bunch
        of time into this, am I barking up the wrong tree?
        >
        I've successfully compiled GMP 4.2.1 on Solaris 10 x86 using both the
        GCC and Sun Studio compilers on AMD 32-bit platform.

        I just compiled GMP 4.2.1 on a P4 using

        $ CFLAGS="" CC=gcc ./configure
        $ gmake; gmake check

        and all tests passed.

        casevh

        Comment

        • casevh@comcast.net

          #5
          Re: "best&quot ; rational number library for Python?

          A guy at work asked for functionality commonly found with rational numbers,
          so I said I'd find and install something. I figured gmpy would be suitable,
          alas I'm having trouble successfully building the underlying GMP 4.2.1
          library on a PC running Solaris 10 (won't compile with the default --host,
          fails "make check" if I go the no-assembly route). Before I invest a bunch
          of time into this, am I barking up the wrong tree?
          >
          I've successfully compiled GMP 4.2.1 on Solaris 10 x86 using both the
          GCC and Sun Studio compilers on AMD 32-bit platform.

          I just compiled GMP 4.2.1 on a P4 using

          $ CFLAGS="" CC=gcc ./configure
          $ gmake; gmake check

          and all tests passed.

          casevh

          Comment

          • casevh@comcast.net

            #6
            Re: "best&quot ; rational number library for Python?

            Oops, on the double-post.

            casevh@comcast. net wrote:
            A guy at work asked for functionality commonly found with rational numbers,
            so I said I'd find and install something. I figured gmpy would be suitable,
            alas I'm having trouble successfully building the underlying GMP 4.2.1
            library on a PC running Solaris 10 (won't compile with the default --host,
            fails "make check" if I go the no-assembly route). Before I invest a bunch
            of time into this, am I barking up the wrong tree?
            I've successfully compiled GMP 4.2.1 on Solaris 10 x86 using both the
            GCC and Sun Studio compilers on AMD 32-bit platform.
            >
            I just compiled GMP 4.2.1 on a P4 using
            >
            $ CFLAGS="" CC=gcc ./configure
            $ gmake; gmake check
            >
            You must use "gmake". "make" fails during "make check"
            and all tests passed.
            >
            casevh

            Comment

            • skip@pobox.com

              #7
              Re: "best&quot ; rational number library for Python?

              >I just compiled GMP 4.2.1 on a P4 using
              >>
              >$ CFLAGS="" CC=gcc ./configure
              >$ gmake; gmake check
              >>
              casevhYou must use "gmake". "make" fails during "make check"

              Very weird:

              piggy:% make -v
              GNU Make 3.80
              Copyright (C) 2002 Free Software Foundation, Inc.
              This is free software; see the source for copying conditions.
              There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
              PARTICULAR PURPOSE.
              piggy:% gmake -v
              GNU Make 3.80
              Copyright (C) 2002 Free Software Foundation, Inc.
              This is free software; see the source for copying conditions.
              There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
              PARTICULAR PURPOSE.

              Nevertheless, using "gmake" instead of "make" did indeed work. Thanks for
              the hint.

              Skip

              Comment

              • Gabriel G

                #8
                Re: "best&quot ; rational number library for Python?

                At Tuesday 31/10/2006 21:16, skip@pobox.com wrote:
                casevhYou must use "gmake". "make" fails during "make check"
                >
                >Very weird:
                >
                piggy:% make -v
                GNU Make 3.80
                piggy:% gmake -v
                GNU Make 3.80
                >
                >Nevertheless , using "gmake" instead of "make" did indeed work. Thanks for
                >the hint.
                Ouch! Like bash behaving different when invoked with the name "sh".
                Why do those programs try to be soooo smart?


                --
                Gabriel Genellina
                Softlab SRL

                _______________ _______________ _______________ _____
                Correo Yahoo!
                Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
                ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

                Comment

                Working...