P1788
P1788 is a Ruby extension wrapping the C++ libieeep1788 interval arithmetic library.
The goal of this gem is to allow doing basic arithmetic in Ruby on set-based intervals.
The output of operations are guaranteed to enclose the true result of operations.
Forward-mode and reverse-mode elementary functions are implemented to allow building contractors.
Documentation
The API documentation is hosted on rubydoc.info.
You can also build the documentation yourself from the sources:
gem install yard
git clone https://gitlab.ensta-bretagne.fr/bollenth/p1788.git
cd p1788
yard
firefox doc/index.html
Installation
Basically:
gem install p1788
To compile, P1788 requires to have the GNU GMP and MPFR development libraries installed on your machine,
as well as the Ruby development headers:
sudo apt install libgmp-dev libmpfr-dev ruby-dev
A copy of libieeep1788 is embedded into this gem, so you do not need to install it.
However, if an installation of libieeep1788 is found on your machine while the gem is installing, it will be used instead of the embedded copy.
Note: to install libieeep1788 from its github repository,
you may need to remove the flags -Wextra -Werror
around line 65 of file libieeep1788/CMakeLists.txt
:
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -pedantic")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
Installation from sources
To install P1788 from sources:
git clone https://gitlab.ensta-bretagne.fr/bollenth/p1788.git
cd p1788
gem build p1788.gemspec
gem install p1788-x.y.z.gem