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

big number

Expand Messages
  • green8819
    ...what is the biggest double floating point number Liberty Basic can handle? If that simply means, what is the biggest number LB can handle? , the answer
    Message 1 of 11 , Jun 28 7:43 PM
      "...what is the biggest double floating point number Liberty Basic can handle?"

      If that simply means, "what is the biggest number LB can handle?", the answer seems to be... LIMITLESS!

      a=9876543210
      for b=1 to 100
      timer 1000,[delay]
      wait
      [delay]
      timer 0
      c=a^b
      print c:print
      next
      end
    • Sarmed N.
      By using Green example, the following could be the smaller number, or the biggest number in negative! ---start code a=9876543210 for b=30 to 32 timer
      Message 2 of 11 , Jun 28 8:59 PM
        By using Green example, the following could be the smaller number, or the biggest number in negative!

        '---start code
        a=9876543210
        for b=30 to 32
        timer 1000,[delay]
        wait
        [delay]
        timer 0
        c=a/(a^b)
        print c,b:print
        next
        end
        '---end code


        ________________________________
        From: green8819 <green8819@...>
        To: libertybasic@yahoogroups.com
        Sent: Friday, June 29, 2012 5:44 AM
        Subject: [libertybasic] big number


         
        "...what is the biggest double floating point number Liberty Basic can handle?"

        If that simply means, "what is the biggest number LB can handle?", the answer seems to be... LIMITLESS!

        a=9876543210
        for b=1 to 100
        timer 1000,[delay]
        wait
        [delay]
        timer 0
        c=a^b
        print c:print
        next
        end




        [Non-text portions of this message have been removed]
      • Marc Rossi
        WOW, That s giant!!!!! ________________________________ From: green8819 To: libertybasic@yahoogroups.com Sent: Thursday, June 28, 2012
        Message 3 of 11 , Jun 29 1:10 AM
          WOW, That's giant!!!!!



          ________________________________
          From: green8819 <green8819@...>
          To: libertybasic@yahoogroups.com
          Sent: Thursday, June 28, 2012 10:44 PM
          Subject: [libertybasic] big number



           

          "...what is the biggest double floating point number Liberty Basic can handle?"

          If that simply means, "what is the biggest number LB can handle?", the answer seems to be... LIMITLESS!

          a=9876543210
          for b=1 to 100
          timer 1000,[delay]
          wait
          [delay]
          timer 0
          c=a^b
          print c:print
          next
          end




          [Non-text portions of this message have been removed]
        • green8819
          ...what is the biggest double floating point number Liberty Basic can handle? was the question. Frankly, I didn t know what was floating point number . I
          Message 4 of 11 , Jun 29 5:14 AM
            "...what is the biggest double floating point number Liberty Basic can handle?" was the question.

            Frankly, I didn't know what was "floating point number". I think I know a little now, after some search.

            The example I gave last can be considered as answer for INTEGER numbers (eg: 11, 275, 384094585). At least I know now that LB can display astronomical numbers.

            A floating-point number is a decimal number.
            (eg: 1.1, 27.5, 384.094585)

            How much is 22/7 ?
            LB gives 3.14285714 as answer (8 decimal digits)

            So probably 8 decimal digits is the answer to the question. It's a measure of precision. A 64-bit computer gives a higher precision.

            '----code start
            a = 1
            print "a ";" = ";a
            print "a/3";" = ";a/3
            print

            a = 1.01
            print "a ";" = ";a
            print "a/3";" = ";a/3
            print

            a = 1.001
            print "a ";" = ";a
            print "a/3";" = ";a/3
            print

            a = 1.0001
            print "a ";" = ";a
            print "a/3";" = ";a/3
            print

            a = 1.00001
            print "a ";" = ";a
            print "a/3";" = ";a/3
            print

            a = 1.000001
            print "a ";" = ";a
            print "a/3";" = ";a/3
            print

            a = 1.0000001
            print "a ";" = ";a
            print "a/3";" = ";a/3
            print

            a = 1.00000001
            print "a ";" = ";a
            print "a/3";" = ";a/3
            print

            END
            '----code end
          • Steve
            Assuming the question was really double PRECISION floating point number  then by definition that is stored as a 64 bit number, even on a 32 bit PC.
            Message 5 of 11 , Jun 29 11:32 AM
              Assuming the question was really "double PRECISION floating point number" then by definition that is stored as a 64 bit number, even on a 32 bit PC. http://en.wikipedia.org/wiki/Double-precision_floating-point_format%c2%a0



              ________________________________
              From: green8819 <green8819@...>
              To: libertybasic@yahoogroups.com
              Sent: Friday, June 29, 2012 5:14 AM
              Subject: [libertybasic] Re: big number

              "...what is the biggest double floating point number Liberty Basic can handle?" was the question.

              Frankly, I didn't know what was "floating point number". I think I know a little now, after some search.

              The example I gave last can be considered as answer for INTEGER numbers (eg: 11, 275, 384094585). At least I know now that LB can display astronomical numbers.

              A floating-point number is a decimal number.
              (eg: 1.1, 27.5, 384.094585)

              How much is 22/7 ?
              LB gives 3.14285714 as answer (8 decimal digits)

              So probably 8 decimal digits is the answer to the question. It's a measure of precision. A 64-bit computer gives a higher precision.

              '----code start
              a = 1
              print "a  ";" = ";a
              print "a/3";" = ";a/3
              print

              a = 1.01
              print "a  ";" = ";a
              print "a/3";" = ";a/3
              print

              a = 1.001
              print "a  ";" = ";a
              print "a/3";" = ";a/3
              print

              a = 1.0001
              print "a  ";" = ";a
              print "a/3";" = ";a/3
              print

              a = 1.00001
              print "a  ";" = ";a
              print "a/3";" = ";a/3
              print

              a = 1.000001
              print "a  ";" = ";a
              print "a/3";" = ";a/3
              print

              a = 1.0000001
              print "a  ";" = ";a
              print "a/3";" = ";a/3
              print

              a = 1.00000001
              print "a  ";" = ";a
              print "a/3";" = ";a/3
              print

              END
              '----code end





              ------------------------------------

              Yahoo! Groups Links



              [Non-text portions of this message have been removed]
            • green8819
              My computer is 32-bit. You may be right, but the highest precision I can get seems to be 32 decimal. From Programs Aceessories Calculator, 1/3 =
              Message 6 of 11 , Jun 29 8:24 PM
                My computer is 32-bit.

                You may be right, but the highest precision I can get seems to be 32 decimal.

                From Programs > Aceessories > Calculator,
                1/3 = 0.33333333333333333333333333333333 (32 decimal digits)

                From LB,
                1/3 = 0.33333333 (8 decimal digits)

                LB's precision is more than enough for me. I can't see anything smaller than 1 mm, (0.001m)

                P.S.
                Right-click My Computer > Properties will tell whether my Windows is 32-bit or 64-bit.
                I don't see "x64 Edition", so mine is 32-bit.


                --- In libertybasic@yahoogroups.com, Steve <lauriecam2002@...> wrote:
                >
                > Assuming the question was really "double PRECISION floating point number" then by definition that is stored as a 64 bit number, even on a 32 bit PC. http://en.wikipedia.org/wiki/Double-precision_floating-point_format%c2%a0
                >
                >
                >
                > ________________________________
                > From: green8819 <green8819@...>
                > To: libertybasic@yahoogroups.com
                > Sent: Friday, June 29, 2012 5:14 AM
                > Subject: [libertybasic] Re: big number
                >
                > "...what is the biggest double floating point number Liberty Basic can handle?" was the question.
                >
                > Frankly, I didn't know what was "floating point number". I think I know a little now, after some search.
                >
                > The example I gave last can be considered as answer for INTEGER numbers (eg: 11, 275, 384094585). At least I know now that LB can display astronomical numbers.
                >
                > A floating-point number is a decimal number.
                > (eg: 1.1, 27.5, 384.094585)
                >
                > How much is 22/7 ?
                > LB gives 3.14285714 as answer (8 decimal digits)
                >
                > So probably 8 decimal digits is the answer to the question. It's a measure of precision. A 64-bit computer gives a higher precision.
                >
                > '----code start
                > a = 1
                > print "a  ";" = ";a
                > print "a/3";" = ";a/3
                > print
                >
                > a = 1.01
                > print "a  ";" = ";a
                > print "a/3";" = ";a/3
                > print
                >
                > a = 1.001
                > print "a  ";" = ";a
                > print "a/3";" = ";a/3
                > print
                >
                > a = 1.0001
                > print "a  ";" = ";a
                > print "a/3";" = ";a/3
                > print
                >
                > a = 1.00001
                > print "a  ";" = ";a
                > print "a/3";" = ";a/3
                > print
                >
                > a = 1.000001
                > print "a  ";" = ";a
                > print "a/3";" = ";a/3
                > print
                >
                > a = 1.0000001
                > print "a  ";" = ";a
                > print "a/3";" = ";a/3
                > print
                >
                > a = 1.00000001
                > print "a  ";" = ";a
                > print "a/3";" = ";a/3
                > print
                >
                > END
                > '----code end
                >
                >
                >
                >
                >
                > ------------------------------------
                >
                > Yahoo! Groups Links
                >
                >
                >
                > [Non-text portions of this message have been removed]
                >
              • Sarmed N.
                Dear Green, In the early days they do binary mathematics on paper. After they manufacture electronic machines, they try make these  machines do the same
                Message 7 of 11 , Jun 29 9:16 PM
                  Dear Green,

                  In the early days they do binary mathematics on paper. After they manufacture electronic machines, they try make these  machines do the same calculations but on hardware.
                  They face the problem of decimal point, there were two choices for decimal point, the fixed decimal point (fixed point) and  moving point (float point), look we don't have operating system yet we are in machine code.
                  In the fixed point there are the same quantity of integers and fraction digits for inputs, and output. The decimal point is fixed too, nothing change, the output must be contained into these digits separated by fixed dp. 

                  0000.00000       input
                  0000.00000       input
                  __________
                  0000.00000       the result

                  In the moving dp (floating point) the decimal point could move to left or write depending on the result, so we can get a long fraction (very small) or a short fraction (bigger).

                  Micro Soft in the early days of VB, the machines were weak, so they use many kinds of variables with  noisy names  like  integer, long, single, double, decimal and many other.
                  I think (maybe I am wrong) the guy who ask the question mix double from MS and float from the meaning above, he trying to ask how much smaller fraction can LB handle. The idea of Stefan was the best.
                  For you, if you are not going to make programs in assembly or machine code the above information is sufficient. And don't worry our chief scots Carl and Stefan maybe others will take care of modern variables in LB5.
                  If you are young man the future is yours, I hope you will see an amassing developments in high level programing languages.

                  Sincerely yours
                  Sarmed N.     


                  ________________________________
                  From: green8819 <green8819@...>
                  To: libertybasic@yahoogroups.com
                  Sent: Friday, June 29, 2012 3:14 PM
                  Subject: [libertybasic] Re: big number


                   
                  "...what is the biggest double floating point number Liberty Basic can handle?" was the question.

                  Frankly, I didn't know what was "floating point number". I think I know a little now, after some search.

                  The example I gave last can be considered as answer for INTEGER numbers (eg: 11, 275, 384094585). At least I know now that LB can display astronomical numbers.

                  A floating-point number is a decimal number.
                  (eg: 1.1, 27.5, 384.094585)

                  How much is 22/7 ?
                  LB gives 3.14285714 as answer (8 decimal digits)

                  So probably 8 decimal digits is the answer to the question. It's a measure of precision. A 64-bit computer gives a higher precision.

                  '----code start
                  a = 1
                  print "a ";" = ";a
                  print "a/3";" = ";a/3
                  print

                  a = 1.01
                  print "a ";" = ";a
                  print "a/3";" = ";a/3
                  print

                  a = 1.001
                  print "a ";" = ";a
                  print "a/3";" = ";a/3
                  print

                  a = 1.0001
                  print "a ";" = ";a
                  print "a/3";" = ";a/3
                  print

                  a = 1.00001
                  print "a ";" = ";a
                  print "a/3";" = ";a/3
                  print

                  a = 1.000001
                  print "a ";" = ";a
                  print "a/3";" = ";a/3
                  print

                  a = 1.0000001
                  print "a ";" = ";a
                  print "a/3";" = ";a/3
                  print

                  a = 1.00000001
                  print "a ";" = ";a
                  print "a/3";" = ";a/3
                  print

                  END
                  '----code end




                  [Non-text portions of this message have been removed]
                • Sarmed N.
                  Green,   You missed the direction. You with your 32 bit pc and LB, can build functions displays more precise results, like an example once I see on LB can
                  Message 8 of 11 , Jun 29 9:26 PM
                    Green,
                     
                    You missed the direction.
                    You with your 32 bit pc and LB, can build functions
                    displays more precise results, like an example once I see on LB can calculate
                    very long precise number as a result of 22/7 pyi.
                     
                    Regards


                    ________________________________
                    From: green8819 <green8819@...>
                    To: libertybasic@yahoogroups.com
                    Sent: Saturday, June 30, 2012 6:24 AM
                    Subject: [libertybasic] Re: big number


                     

                    My computer is 32-bit.

                    You may be right, but the highest precision I can get seems to be 32 decimal.

                    From Programs > Aceessories > Calculator,
                    1/3 = 0.33333333333333333333333333333333 (32 decimal digits)

                    From LB,
                    1/3 = 0.33333333 (8 decimal digits)

                    LB's precision is more than enough for me. I can't see anything smaller than 1 mm, (0.001m)

                    P.S.
                    Right-click My Computer > Properties will tell whether my Windows is 32-bit or 64-bit.
                    I don't see "x64 Edition", so mine is 32-bit.

                    --- In libertybasic@yahoogroups.com, Steve <lauriecam2002@...> wrote:
                    >
                    > Assuming the question was really "double PRECISION floating point number" then by definition that is stored as a 64 bit number, even on a 32 bit PC. http://en.wikipedia.org/wiki/Double-precision_floating-point_format%c2%a0
                    >
                    >
                    >
                    > ________________________________
                    > From: green8819 <green8819@...>
                    > To: libertybasic@yahoogroups.com
                    > Sent: Friday, June 29, 2012 5:14 AM
                    > Subject: [libertybasic] Re: big number
                    >
                    > "...what is the biggest double floating point number Liberty Basic can handle?" was the question.
                    >
                    > Frankly, I didn't know what was "floating point number". I think I know a little now, after some search.
                    >
                    > The example I gave last can be considered as answer for INTEGER numbers (eg: 11, 275, 384094585). At least I know now that LB can display astronomical numbers.
                    >
                    > A floating-point number is a decimal number.
                    > (eg: 1.1, 27.5, 384.094585)
                    >
                    > How much is 22/7 ?
                    > LB gives 3.14285714 as answer (8 decimal digits)
                    >
                    > So probably 8 decimal digits is the answer to the question. It's a measure of precision. A 64-bit computer gives a higher precision.
                    >
                    > '----code start
                    > a = 1
                    > print "a  ";" = ";a
                    > print "a/3";" = ";a/3
                    > print
                    >
                    > a = 1.01
                    > print "a  ";" = ";a
                    > print "a/3";" = ";a/3
                    > print
                    >
                    > a = 1.001
                    > print "a  ";" = ";a
                    > print "a/3";" = ";a/3
                    > print
                    >
                    > a = 1.0001
                    > print "a  ";" = ";a
                    > print "a/3";" = ";a/3
                    > print
                    >
                    > a = 1.00001
                    > print "a  ";" = ";a
                    > print "a/3";" = ";a/3
                    > print
                    >
                    > a = 1.000001
                    > print "a  ";" = ";a
                    > print "a/3";" = ";a/3
                    > print
                    >
                    > a = 1.0000001
                    > print "a  ";" = ";a
                    > print "a/3";" = ";a/3
                    > print
                    >
                    > a = 1.00000001
                    > print "a  ";" = ";a
                    > print "a/3";" = ";a/3
                    > print
                    >
                    > END
                    > '----code end
                    >
                    >
                    >
                    >
                    >
                    > ------------------------------------
                    >
                    > Yahoo! Groups Links
                    >
                    >
                    >
                    > [Non-text portions of this message have been removed]
                    >




                    [Non-text portions of this message have been removed]
                  • Stefan Pendl
                    ... LB is calculating to the full 64-bit double precision of a floating point number internally. You can use the USING() function to display more decimal
                    Message 9 of 11 , Jun 29 10:12 PM
                      Am 30.06.2012 05:24, schrieb green8819:
                      >
                      >>From LB,
                      > 1/3 = 0.33333333 (8 decimal digits)
                      >
                      > LB's precision is more than enough for me. I can't see anything smaller than 1 mm, (0.001m)
                      >

                      LB is calculating to the full 64-bit double precision of a floating
                      point number internally.

                      You can use the USING() function to display more decimal places after
                      the period.

                      The precision of the floating point numbers is neither related to the
                      operating system being 32- or 64-bit nor to the CPU being 32- or 64-bit.
                      The application being 32- or 64-bit doesn't matter either, since this is
                      all handled by the math co-processor of the CPU.

                      You may encounter a floating point error below the 16th decimal place
                      after the period, but that is usually ignorable.


                      --
                      Stefan Pendl
                      http://stefanpendl.runbasichosting.com/

                      LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                      LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

                      LB Community Wiki .............. http://basic.wikispaces.com/
                      LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                      LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

                      Books at http://www.lulu.com/ and http://www.amazon.com/
                      Alyce Watson ... APIs for Liberty BASIC
                      Carl Gundel .... Beginning Programming with Liberty BASIC

                      Windows 7 Home Premium 64-bit SP1
                      AMD Turion X2 RM-70 2GHz, 4GB RAM
                    • green8819
                      Stefan, you are right. I tried this: print using( #.############### ,1/3) 15 dec digits print using( #.############################## ,1/3) 30 print
                      Message 10 of 11 , Jun 29 11:53 PM
                        Stefan, you are right.

                        I tried this:

                        print using("#.###############",1/3) '15 dec digits
                        print using("#.##############################",1/3) '30
                        print using("#.############################################################",1/3) '60

                        Where is the end (if there is)?
                        According to another expert's opinion I received earlier, it is 302 digits long. He should be right, too.

                        Sarmed, thanks for the History lesson. I have a strange feeling that you were part of the team that invented the computer.

                        Marc Rossi, are you the expert who promised to teach us "Locking", but didn't deliver? If you are, you should have known the answer to the question you originated.

                        What I want is to find a way to match my 7-digit purchase with the Jackpot number!

                        Thank you guys.
                        Enjoy the weekend.
                      • green8819
                        I wrote thus: ...According to another expert s opinion I received earlier, it is 302 digits long... It should read: ...308 digits long... Doesn t matter.
                        Message 11 of 11 , Jun 30 8:55 AM
                          I wrote thus:
                          "...According to another expert's opinion I received earlier, it is 302 digits long..."

                          It should read:
                          "...308 digits long..."

                          Doesn't matter. Both the original question and answer are of academic interest only; meaning, like an exam question.

                          Thanks.

                          --- In libertybasic@yahoogroups.com, "green8819" <green8819@...> wrote:
                          >
                          > Stefan, you are right.
                          >
                          > I tried this:
                          >
                          > print using("#.###############",1/3) '15 dec digits
                          > print using("#.##############################",1/3) '30
                          > print using("#.############################################################",1/3) '60
                          >
                          > Where is the end (if there is)?
                          > According to another expert's opinion I received earlier, it is 302 digits long. He should be right, too.
                          >
                          > Sarmed, thanks for the History lesson. I have a strange feeling that you were part of the team that invented the computer.
                          >
                          > Marc Rossi, are you the expert who promised to teach us "Locking", but didn't deliver? If you are, you should have known the answer to the question you originated.
                          >
                          > What I want is to find a way to match my 7-digit purchase with the Jackpot number!
                          >
                          > Thank you guys.
                          > Enjoy the weekend.
                          >
                        Your message has been successfully submitted and would be delivered to recipients shortly.