Announcement

Collapse
No announcement yet.

Maximum Float Precision

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Maximum Float Precision

    What is the maximum precision I can squeak out of a variable?

    Is it just double precision?

    I need to represent this number:

    Phi = 1·61803 39887 49894 84820 45868 34365 63811 77203 09179 80576 ...

    from:

    Phi = (SQRT(5) + 1)/2

    FYI - then I need to use Phi to find a FIB number with:

    Fibn = Phi^n - (-1^n) / Phi^n / SQRT(5)


    ------------------
    Kind Regards
    Mike

  • #2
    That goes well beyond the precision of even PowerBASIC's extended floating point types. You're going to need something like a good indefinite-precision BCD library.


    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Comment


    • #3
      Wassat?

      ------------------
      Kind Regards
      Mike

      Comment


      • #4
        It's a fancy name for a third-party maths library that offers a very high degree of floating point precision...

        Try asking over at http://www.teratech.com - they have maths packages, but I'm not sure if they deal with this level of precision.

        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


        • #5
          Mike,
          If you don't need to incorporate routines into PB but only to perform math operations with many (>2000) digits
          you might try the free UBASIC interpreter:

          ftp://rkmath.rikkyo.ac.jp/pub/ubibm/



          ------------------
          Aldo Vitagliano
          mailto:[email protected][email protected]</A>
          Aldo Vitagliano
          alvitagl at unina it

          Comment

          Working...
          X