Coder Social home page Coder Social logo

arpra-project / arpra Goto Github PK

View Code? Open in Web Editor NEW
23.0 4.0 1.0 867 KB

Arpra is a C library for analyzing the propagation of numerical error in arbitrary precision IEEE-754 floating-point computations.

License: GNU Lesser General Public License v3.0

C 98.40% Makefile 1.07% M4 0.53%
scientific-computing arbitrary-precision range-analysis numerical-analysis mpfr affine-arithmetic static-analysis

arpra's Introduction

Arpra

Copyright 2016-2022 James Paul Turner.

This file is part of the Arpra library.

The Arpra library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Arpra library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Arpra library. If not, see http://www.gnu.org/licenses/.

For any copyright year range specified as YYYY-ZZZZ in this package, note that the range specifies every single year in that closed interval.

Introduction

Arpra is a C library for (Ar)bitrary-(p)recision (r)ange (a)nalysis of IEEE-754 floating-point computations, based on GNU MPFR. The main use-case of Arpra is to maintain computed upper and lower bounds of numerical error for all variables, at all times, throughout a computation. Arpra uses mixed trimmed interval/affine arithmetic with deviation term reduction to accomplish this.

Affine arithmetic is a variant of interval arithmetic which accounts for variable correlations. As such, it does not suffer from the so-called 'dependency problem', where intervals grow overly large due to lack of consideration for variable correlations. The problem is described further at https://en.wikipedia.org/wiki/Interval_arithmetic#Dependency_problem. By combining the results of interval arithmetic and affine arithmetic, one avoids both the dependency problem of interval arithmetic, and the nonlinear function overshoot/undershoot problem of affine arithmetic.

Arpra implements affine arithmetic using a GNU MPFR backend. MPFR is an arbitrary-precision floating-point library, meaning the floating-point MPFR variables can be of arbitrary precision. For more information, refer to the MPFR project website at http://www.mpfr.org/. By implementing affine arithmetic with an arbitrary-precision backend, one is able, for example, to test how a change in numerical precision or integration scheme affects local and global error during a long numerical simulation, without the interval 'explosion' problem regular interval arithmetic suffers from.

For further information on the implementation and features of Arpra, such as range trimming and deviation term reduction, refer to the original published article:

Turner, J. P., & Nowotny, T. (2021). Arpra: An Arbitrary Precision Range Analysis Library. Frontiers in Neuroinformatics, 30.

https://doi.org/10.3389/fninf.2021.632729

Quickstart

Arpra follows the familiar GNU/Linux software building paradigm. The typical installation procedure consists of the following.

If installing from the Git source repository (i.e. not a dist tarball), the configure script and other auxillary files need to be generated by running the following command in the root of the repository:

autoreconf -i -Wall

This generates the configuration files from the configure.ac and the Makefile.am files (note that the GNU Autotools must be installed in order to run autoreconf). Next run the configure, build and install commands:

./configure
make
sudo make install

All installed Arpra files can be cleanly uninstalled from the system by running the following command:

sudo make uninstall

A suite of test programs can be executed with the following command:

make check

Contribute

All contributions (e.g. bug reports, feature requests, expert knowledge, source code and documentation contributions) are gratefully received via the issue tracker https://github.com/arpra-project/arpra/issues or pull request.

The source code repository for Arpra is hosted at GitHub. Clone it using:

git clone https://github.com/arpra-project/arpra

arpra's People

Contributors

jamesturner246 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

wincle626

arpra's Issues

Modernising the Arpra buildsystem

This issue tracks the Arpra project buildsystem change.

In this change, the current GNU Make buildsystem will be replaced with a modern alternative. Candidates are:

  • CMake
  • Meson

Further research required.

Gaussian noise symbols

Noise symbols ε are currently all uniformly distributed in [-1, 1]. The possibility of having ε normally distributed about 0, with standard distribution σ, might also be useful, for statistical applications.

Normally distributed ε could be stored and computed in a separate array, in a similar manner to uniformly distributed ε. All σ for each ε would need to be stored globally.

configure is missing

Following the instructions in README:

kbriggs:~/Downloads/mpfa-0.0.0> ./configure
bash: ./configure: No such file or directory

Taylor series deviation terms

Add support for Taylor series deviation terms.

Currently, Arpra only supports first-order deviation terms (affine arithmetic).

Add split and join functions for ranges

The 'split' function should split a range into two or more new ranges.
The 'join' function should merge two or more ranges into one new range.

The resulting ranges of both functions should be as tight as possible, while preserving as much correlation information as possible. The joint range of all output ranges should fully contain the joint range of all input ranges, preserving the fundamental invariant of range analysis (see http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.36.8089, section 1.2.3).

New name and logo for the MPFA project

The current name, MPFA, is a twist on MPFR (GNU Multiple Precision Floating-Point Reliably), on which this software is based; the A stands for Affine Arithmetic. I picked the name without much thought, following the example of the MPFI Interval Arithmetic library, however I am concerned that these similarly named libraries will be easily mistaken for each other.

As such, I think MPFA should be changed to something more unique and memorable, whilst this is still possible without disruption, and propose a vote for the new name. I will update this post with the candidates so far, and their vote counts, but please suggest alternatives if none appeal to you. I will set a provisional deadline at the end of 31st January 2018, UTC time.

A new logo for the website must also be eventually chosen, and will throw in some options as I think of them, but I welcome all other submissions. Again, I will update this post with candidates.

A couple of names, and my vote, to begin with:

MPFA (keep the existing name)
0 votes

ArPRA ([Ar]bitrary [P]recision [R]ange [A]nalysis)
1 vote

MP Range ([M]ultiple [P]recision [Range] Analysis)
0 votes

AP Range ([A]rbitrary [P]recision [Range] Analysis)
0 votes

RAMP ([R]ange [A]nalysis [M]ultiple [P]recision)
0 votes

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.