GithubHelp home page GithubHelp logo

santoshn / rlibm-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rutgers-apl/rlibm-generator

0.0 0.0 0.0 59 KB

A tool to generate approximations of elementary functions that produce the correctly rounded result for all inputs. This tool can be used for different representations that approximate real numbers.

License: Other

Shell 1.42% C++ 96.67% Makefile 1.90%

rlibm-generator's Introduction

RLibm-generator

This tool is used to generate the RLibm math library. For more information behind the techniques in RLibm-generator, please refer to this paper.

Installation

Prerequisite:

  • GMP : Needed by Soplex 4.0.1
  • Soplex 4.0.1 : Please read below on how to install Soplex 4.0.1 to use with rlibm-generator
  • MPFR
  • SoftPosit

Installation instruction:

  1. Make sure you have GMP and MPFR installed.

  2. Install SoftPosit according to the instructions from the SoftPosit website

  3. Install Soplex 4.0.1

  4. Download Soplex version 4.0.1 source code.

  5. Untar Soplex

tar -xvf soplex-4.0.1.tar
  1. cd into soplex directory and create a build directory inside
cd soplex-4.0.1
mkdir build
  1. cd into build directory and build soplex. Make sure you have GMP installed prior to this step.
cd build
cmake ..
make
  1. Create 2 environment variables to specify where softposit and soplex is installed:
export SOFTPOSITPATH=<path_to_softposit_directory>
export SOPLEXPATH=<path_to_soplex-4.0.1_directory>
  1. To run the math library function generators, use the script
cd rlibm-generator
./runFunctioonGen.sh

More Detail

If you would like to generate the functions individually, the function generation scripts are in functiongen directory. Functiongen directory is organized into each representation (bfloat16, float, posit16, etc) and each directory is further organized into the method of how we generate the function. There are two ways we generate the functions:

  1. Full: We use ALL intervals when generating the LP query and feed it to the LP solver to generate the polynomial
  2. Sampling: We sample some intervals, create LP query based on the sample.

Inside of full or sampling directory, there are cpp files that generates the polynomial for each elementary function and a makefile. You can use the makefile to compile the program and run each program that generate the polynomial for a single elementary function.

rlibm-generator's People

Contributors

jpl169 avatar santoshn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.