Notes:
Version
-------
This version ($Name: PRE_ALPHA_0_22 $) is functionally identical with the previous
pre-alpha-0.21. Some minor bugfixes have been made, because the
exponential function sporadically showed a wrong result in having the
last digit off by 1 from what would be the correct value. Some
runit-tests have been added. A second runit-testing program that runs
only tests of exponential function with random numbers for a long time
has been added.
There are no known bugs and this version can be considered complete in
terms of functionality. This version is still a pre-alpha-version,
but it is expected to move it to alpha within the next days of weeks,
after having added some more tests and having fixed potential bugs
that these tests might reveal. The first alpha version is not
expected to be much different from this version. This version should
already be usable. Operations +, -, *, / and sqrt should be working
properly and would justify calling this release at least beta. Even
log, exp and power should be fine, but they might have some issues in
terms of precision, so that the last digits of the result might be
wrong, or in terms of speed. For this reason they are currently
considered to be alpha, as soon as significant amount testing with
random numbers as parameters has been performed. It would be a good
idea to do some mathematical analysis on how many digits are needed
internally to guarantee the correctness of the digits that are
provided. But this will not be considered as a requirement for the
alpha-version.
This software development effort is hosted on RubyForge (
http://rubyforge.org/ ) under the project name "long-decimal", to be
found directly with http://rubyforge.org/projects/long-decimal/ . So
you should feel encouraged to look if there is a newer version, when
you install long-decimal.
Test
----
Some runit tests have been included. They give some indication of the
correctness of this library and allow changes to be checked in order
to make sure that what was running before would still work afterwards.
Tests for a library as complex as long-decimal can never be
exhaustive, but they give a good indication that methods are working
correctly. About 95% of the tests that will be eventually needed are
already present. As a policy a release is not created unless all
tests succeed. Running the tests can take a few minutes, depending on
your machine. It is about 15 minutes on my machine (1300 MHz).
Whatever is gained by making the software run faster is used up again
by adding more tests. This is the result of the test:
Finished in 835.976186 seconds.
116 tests, 44585 assertions, 0 failures, 0 errors
Install
-------
(REMARK: installation has only been successfully tested on Linux with
ruby 1.8.4 and on Windows 2000 with ruby 1.8.2)
1. Using ruby-gems (preferred)
- open a shell window
- become root, unless the current user has the right to install gems
(which is usually the case on windows)
su
- uninstall old versions
gem uninstall long-decimal
- install the newest version
gem install long-decimal
- Usage from your ruby-programs:
require "rubygems"
require_gem "long-decimal"
- documentation will be found in HTML-format in the directory
$RUBY_DIR/gems/$RUBY_VERSION/doc/long-decimal-$LONG_DECIMAL_VERSION/rdoc/index.html
where $RUBY_DIR is the directory containing your ruby-installation,
usually /usr/lib/ruby or /usr/local/lib/ruby on
Linux/Unix-systems.
$RUBY_VERSION is the major version of your Ruby, like 1.8
$LONG_DECIMAL_VERSION is the version of long-decimal that you
have installed, like 0.00.20
on my machine that would be
/usr/local/lib/ruby/gems/1.8/doc/long-decimal-0.00.20/rdoc/index.html
2. Installing from the sources (it is preferred to use the
gem-installation, but since long-decimal is open-source-software you
are off course granted the right to download the source and change
it and install your own version.
- download the newest source-tar.gz-file from long-decimal project at rubyforge
which can be found by
http://rubyforge.org/projects/long-decimal/ -> Files
( http://rubyforge.org/frs/?group_id=1334 )
- open a shell window
cd to the directory where you have downloaded the gem-file
unpack the file using tar
tar xfzvv long-decimal-pre-alpha-0_17.tar.gz
cd long-decimal
- now you can use rake for several operations
- rake test
runs runit tests. All tests should succeed.
- rake doc
creates the documentation
- rake gem creates the gem-file in a sub-directory pkg
recommended for installation, proceed as in 1
- cd pkg
- gem install --local long-decimal
3. The documentation can be created from the sources. It is contained
in the gem-file. It is not provided as a separate file any more.
License
-------
Ruby's license or LGPL
Find copies of these licenses on http://www.gnu.org/ or http://www.ruby-lang.org/
Warranty
--------
This is a pre-alpha-version. Do not expect too much! This is work in progress!
I do not take any responsibility. Please use it as it is, change it
according to the terms of the license or wait for a more stable
version (for wich I can't take any warranty either...)
Author
------
Karl Brodowsky
http://www.velofahren.de/cgi-bin/mailform.cgi
(no direct mail address because I do not like spam)
Changes:
added some tests
fixed some bugs
added some comments
moved non-test-methods from testlongdecimal.rb to testlongdeclib.rb
added new test testrandom.rb which runs for a very long time and uses random numbers to create tests.
|