Notes:
Version
-------
This version ($Name: PRE_ALPHA_0_17 $) is functionally almost identical with the
previous pre-alpha-0.16. The method to_ld() now supports optional
parameters to provide desired number of digits after the decimal point
and rounding_mode for conversion. Some tests and comments have been
added. The documentation-tar.gz is no longer included, because the
documentation tar.gz-files of previous versions were hardly downloaded
and because it is possible to obtain the documentation from the
gem-file or from the source-file.
It could be observed that gem-installation, as described below, fails
on Windows 2000 with ruby 1.8.2, but works on Linux with ruby 1.8.4
Any help from someone who knows more about Ruby on Windows would be
apreciated. For the time being long-decimal has to be considered
platform specific for Linux/Unix.
Beyond this restriction 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 weeks, after having added some more tests and having
fixed potential bugs that these tests might reveal. I do not expect
the first alpha version to be much different from this version.
Install
-------
(REMARK: installation has only been successfully tested on Linux with
ruby 1.8.4 and has been observed to fail on Windows 2000)
1. Using ruby-gems (preferred)
- download the newest gem-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
(on some systems you need to become root before installing:)
su
gem install long-decimal
[remark: currently rubyforge does not publish long-decimal directly
as gem, so you can't use gem to download, but you have to
download the gem-file manually first and then use gem only
to install it]
- 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.17
on my machine that would be
/usr/local/lib/ruby/gems/1.8/doc/long-decimal-0.00.17/rdoc/index.html
2. Installing from the sources (it is preferred to use the gem-installation)
- 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
- rake install installs directly into the site-ruby-directory.
it is preferred to use
rake gem
cd pkg
gem install long-decimal
3. The documentation can be created from the sources. It is contained
in the gem-file.
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 comments
added some tests
added optional parameters to methods to_ld()
|