Correctly Rounded Math Functions for Ruby floats
CRMF is a Ruby C extension which provides correctly rounded math functions for Ruby floats. CRMF is using MPFR, and CRlibm when possible. Provided rounding modes are:
- toward zero,
- toward +infinity,
- toward -infinity,
- to nearest even.
Documentation
Documentation is available at https://www.rubydoc.info/gems/crmf.
Installation
# Install prerequisites
sudo apt install ruby ruby-dev build-essential libgmp-dev libmpfr-dev
# Install the gem from RubyGems
gem install crmf
Building from sources
# Install prerequisites
sudo apt install ruby ruby-dev build-essential libgmp-dev libmpfr-dev
# Clone this repository, build the gem then install it
git clone https://gitlab.ensta-bretagne.fr/bollenth/crmf.git
cd crmf
gem build crmf.gemspec
gem install --local crmf-0.1.1.gem
# Generate the documentation and open it
gem install yard redcarpet coderay
yard
firefox doc/index.html