Skip to content

Commit

Permalink
added some references + docs + ideas for the future
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Sep 7, 2014
1 parent 4e3ee5d commit 18c0c71
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: node_js
node_js:
- "0.11"
- "0.10"
- "0.8"
- "0.6"
install:
- npm -d install
script:
- npm test
after_success:
- ./node_modules/.bin/coveralls < coverage/lcov.info || true
- ./node_modules/.bin/codeclimate < coverage/lcov.info || true
# env:
# - COVERALLS_REPO_TOKEN=000000000000000000000000000000000
# - CODECLIMATE_REPO_TOKEN=0000000000000000000000000000000000000000000000000000000000000000
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

multi-precision arithmetic code bricks for JavaScript

[![Build Status](https://drone.io/github.com/aureooms/alu/status.png)](https://drone.io/github.com/aureooms/alu/latest)
[![Build Status](https://travi-ci.org/aureooms/alu.svg)](https://travi-ci.org/aureooms/alu)
[![Coverage Status](https://coveralls.io/repos/aureooms/alu/badge.png)](https://coveralls.io/r/aureooms/alu)
[![Dependencies Status](https://david-dm.org/aureooms/alu.png)](https://david-dm.org/aureooms/alu#info=dependencies)
[![devDependencies Status](https://david-dm.org/aureooms/alu/dev-status.png)](https://david-dm.org/aureooms/alu#info=devDependencies)
[![Code Climate](https://codeclimate.com/github/aureooms/alu.png)](https://codeclimate.com/github/aureooms/alu)

references:

- [The GNU Multiple Precision Arithmetic Library](https://gmplib.org/)
18 changes: 18 additions & 0 deletions js/dist/alu.js
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,10 @@ var bsplit_t = function(br, z) {

exports.bsplit_t = bsplit_t;
/* js/src/div */
/* js/src/div/dcdiv.js */

// https://gmplib.org/manual/Divide-and-Conquer-Division.html

/* js/src/div/div.js */


Expand Down Expand Up @@ -687,6 +691,10 @@ var bdiv_t = function(lt, sub){
};

exports.bdiv_t = bdiv_t;
/* js/src/div/fourierdiv.js */

// http://en.wikipedia.org/wiki/Fourier_division

/* js/src/gcd */
/* js/src/gcd/gcd.js */
/**
Expand Down Expand Up @@ -771,6 +779,12 @@ exports.bdiv_t = bdiv_t;
* (a1 - a0)(b1 - b0) = (a1 b1 + a0 b0) - (a1 b0 + a0 b1)
* (a0 - a1)(b1 - b0) = (a1 b0 + a0 b1) - (a1 b1 + a0 b0)
* a b = (r^{2n} + r^{n})a1 b1 + r^{n}(a0 - a1)(b1 - b0) + (r^{n} + 1)a0 b0
*
* This algorithm is a generalization of the Toom-Cook algorithm, when m = n = 2.
*
* For further reference, see
* - http://en.wikipedia.org/wiki/Karatsuba_algorithm
* - http://en.wikipedia.org/wiki/Toom–Cook_multiplication
*/

var bkaratsuba_t = function(add, sub, mul, calloc, mov, r, wrap){
Expand Down Expand Up @@ -1014,6 +1028,10 @@ var lmul53_t = function(r){


exports.lmul53_t = lmul53_t;
/* js/src/mul/toomcook.js */

// http://en.wikipedia.org/wiki/Toom–Cook_multiplication

/* js/src/neg */
/* js/src/neg/neg.js */
/**
Expand Down
2 changes: 1 addition & 1 deletion js/dist/alu.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions js/src/div/dcdiv.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

// https://gmplib.org/manual/Divide-and-Conquer-Division.html
2 changes: 2 additions & 0 deletions js/src/div/fourierdiv.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

// http://en.wikipedia.org/wiki/Fourier_division
6 changes: 6 additions & 0 deletions js/src/mul/karatsuba.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
* (a1 - a0)(b1 - b0) = (a1 b1 + a0 b0) - (a1 b0 + a0 b1)
* (a0 - a1)(b1 - b0) = (a1 b0 + a0 b1) - (a1 b1 + a0 b0)
* a b = (r^{2n} + r^{n})a1 b1 + r^{n}(a0 - a1)(b1 - b0) + (r^{n} + 1)a0 b0
*
* This algorithm is a generalization of the Toom-Cook algorithm, when m = n = 2.
*
* For further reference, see
* - http://en.wikipedia.org/wiki/Karatsuba_algorithm
* - http://en.wikipedia.org/wiki/Toom–Cook_multiplication
*/

var bkaratsuba_t = function(add, sub, mul, calloc, mov, r, wrap){
Expand Down
2 changes: 2 additions & 0 deletions js/src/mul/toomcook.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

// http://en.wikipedia.org/wiki/Toom–Cook_multiplication

0 comments on commit 18c0c71

Please sign in to comment.