Loading ...
Sorry, an error occurred while loading the content.

Big_Int

Expand Messages
  • huiyuan_ma
    I wonder how can I load a Big_Int module in ML? I tried open, use, and none of them worked. I need to handle some arbitrarily huge numbers. Thanks a lot!
    Message 1 of 3 , Feb 9, 2005
    • 0 Attachment
      I wonder how can I load a Big_Int module in ML? I tried open, use, and
      none of them worked. I need to handle some arbitrarily huge numbers.
      Thanks a lot!
    • Karl Zilles
      ... Hi, Big_int is contained in the Num library. Documentation for the Num library is here: http://caml.inria.fr/ocaml/htmlman/manual036.html On this page it
      Message 2 of 3 , Feb 9, 2005
      • 0 Attachment
        huiyuan_ma wrote:
        >
        > I wonder how can I load a Big_Int module in ML? I tried open, use, and
        > none of them worked. I need to handle some arbitrarily huge numbers.
        > Thanks a lot!

        Hi,

        Big_int is contained in the Num library.

        Documentation for the Num library is here:
        http://caml.inria.fr/ocaml/htmlman/manual036.html

        On this page it says:

        For interactive use of the nums library, do:

        ocamlmktop -o mytop nums.cma
        ./mytop

        or (if dynamic linking of C libraries is supported on your platform),
        start ocaml and type #load "nums.cma";;
      • William D.Neumann
        ... You need to load the nums library first. From the OCaml manual, chapter 22 (The num library): Programs that use the num library must be linked as follows:
        Message 3 of 3 , Feb 9, 2005
        • 0 Attachment
          On Feb 9, 2005, at 6:55 PM, huiyuan_ma wrote:

          > I wonder how can I load a Big_Int module in ML? I tried open, use, and
          > none of them worked. I need to handle some arbitrarily huge numbers.
          > Thanks a lot!

          You need to load the nums library first. From the OCaml manual,
          chapter 22 (The num library):

          Programs that use the num library must be linked as follows:

          ocamlc 'other options' nums.cma 'other files'
          ocamlopt 'other options' nums.cmxa 'other files'

          For interactive use of the nums library, do:
          ocamlmktop -o mytop nums.cma
          ./mytop

          or (if dynamic linking of C libraries is supported on your platform),
          start ocaml and type
          #load "nums.cma";;

          If you do that, you can use Big_int with impunity...

          William D. Neumann

          "You've got Rita Marlowe in the palm of your hand."
          "Palm of my hand? You haven't seen Rita Marlowe..."

          -- Will Success Spoil Rock Hunter?
        Your message has been successfully submitted and would be delivered to recipients shortly.