# robust-sum

> Evaluates the sum of two nonoverlapping increasing sequences of floats

Latest version **1.0.0** (published 2014-04-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install robust-sum
pnpm add robust-sum
yarn add robust-sum
bun add robust-sum
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-04-28 |
| First published | 2013-09-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko |
| Keywords | robust, sum, float, exact, nonoverlapping, shewchuk |

## Links

- npm: https://www.npmjs.com/package/robust-sum
- Repository: https://github.com/mikolalysenko/robust-sum
- Issues: https://github.com/mikolalysenko/robust-sum/issues
- npm.io page: https://npm.io/package/robust-sum

## Recent versions

- 1.0.0 (latest) — 2014-04-28
- 0.0.3 — 2013-10-23
- 0.0.2 — 2013-09-19
- 0.0.0 — 2013-09-18

## README

robust-sum
==========
Computes the sum of two increasing non-overlapping sequences of floats as an increasing non-overlapping sequence.  This can be used to perform exact arithmetic calculations on floating point values.

For more information, see:

* Jonathan Richard Shewchuk, ["Adaptive precision floating-point arithmetic and fast robust geometric predicates"](http://www.cs.cmu.edu/afs/cs/project/quake/public/papers/robust-arithmetic.ps). 1997

## Install

		npm install robust-sum

## Example

```javascript
var robustSum = require("robust-sum")

var seq = robustSum([1, 64], [1e-64, 1e64])
console.log("result = ", seq)
```

## API

### `require("robust-sum")(a, b)`
Computes the sum of two non-overlapping increasing sequences of floats exactly as a non-overlapping increasing sequence of floats.

* `a` is a non-overlapping sequence of floats that is increasing in magnitude
* `b` is a non-overlapping sequence of floats that is increasing magnitude

**Returns** A non-overlapping increasing sequence that encodes the result of `a+b`

## Credits
Based on JRS' robust geometric predicates for floating point arithmetic.

Implementation (c) 2013 Mikola Lysenko. MIT License

---
_Source: https://npm.io/package/robust-sum · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
