Arbitrary Precision Floating Point (APFP)
  1. by Dennis Darland dennis.darland@yahoo.com

    dennisdarland.com

    NOTE(3/25/2007) : Different e-mail address (old forwarded address stopped working sometime in the past).

    Comments welcome

  2. Initially developed as procedures in Icon then reworked as classes & overloaded operators in Unicon.

  3. Reworked much more elegantly in Ruby. Mostly because of greatly increased knowledge of problem from having done it before. Also conciseness of Ruby.

  4. Online Real Calculator using Apfp (with Ruby on Rails)

    Online Complex Calculator using Apfp (with Ruby on Rails)

    Note: I fixed a lot in doing this calculator and it has now been incorporated into the release RubyApfp13.tgz. I plan to do still more extensive testing on RubyApfp. It is so much easier.

  5. Provides class for Reals. This class uses a Float for both the value and possible error. Error is calculated from differentials. This can be just round off error or error in knowedge of the true value which may me significantly larger than the round off error.

  6. Provives similar class for Apfp using large Fixnum - Ruby's built in large integers for mantisa and exponents for both value & error. Same capabilities otherwise as Real.

  7. Also provides Apc class for complex which may use either Real or Apfp.

  8. Which class to use is determined by NUM_DIGITS in ApConfig.rb. If this is > 16 Apfp is used, otherwise Real is used.

  9. Fixed problem if no decimal point. In it if values have a decimal point, then at least one digit is required before & after it. Also may have an optional exponent. (e.g. "7.5" or "3.5e-6"). Also may have optional error. (e.g. "7.5+/-0.0002" or "3.5e-6+/-0.1e-24"). If error is not given precision asked for in NUM_DIGITS is used or Float::EPSILON for Reals. NUM_DIGITS is set to 24 in calc01 and calc02 (rails calculators). The error estimation in Real.rb is not nearly as good as that in Apfp.rb.

  10. Sourceforge Project Apfp page APFP PAGE

  11. To Download RubyApfp13.tgz: RubyApfp13.tgz

    NOTE: when downloading make sure you get the suffix ".tgz" In windows Vista I had to go to 'Windows explorer -- organize -- Folders and search options --view--- hide extensions for known file types` and deselect it.

  12. Sourceforge Project Sode Page (Ruby version 10 is now available). SODE PAGE

    Dennis J. Darland

    SourceForge Logo