[Pkg-javascript-commits] [science.js] 39/87: Add Euler's constant.

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:11:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

bhuvan-guest pushed a commit to branch master
in repository science.js.

commit 24ddb1c26f0b2d569b86d889165c5cc33ad2c464
Author: Jason Davies <jason at jasondavies.com>
Date:   Sun Aug 28 00:40:46 2011 +0100

    Add Euler's constant.
---
 Makefile              | 1 +
 science.js            | 2 ++
 science.min.js        | 2 +-
 src/core/constants.js | 2 ++
 4 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 7627532..f53b53b 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ all: \
 
 science.core.js: \
 	src/core/core.js \
+	src/core/constants.js \
 	src/core/expm1.js \
 	src/core/functor.js \
 	src/core/hypot.js \
diff --git a/science.js b/science.js
index cf7eed0..665d3de 100644
--- a/science.js
+++ b/science.js
@@ -1,4 +1,6 @@
 (function(){science = {version: "1.5.0"}; // semver
+// Euler's constant.
+science.EULER = .5772156649015329;
 // Compute exp(x) - 1 accurately for small x.
 science.expm1 = function(x) {
   return (x < 1e-5 && x > -1e-5) ? x + .5 * x * x : Math.exp(x) - 1;
diff --git a/science.min.js b/science.min.js
index 1ca449e..dc46151 100644
--- a/science.min.js
+++ b/science.min.js
@@ -1 +1 @@
-(function(){science={version:"1.5.0"},science.expm1=function(a){return a<1e-5&&a>-0.00001?a+.5*a*a:Math.exp(a)-1},science.functor=function(a){return typeof a=="function"?a:function(){return a}},science.hypot=function(a,b){a=Math.abs(a),b=Math.abs(b);var c,d;a>b?(c=a,d=b):(c=b,d=a);var e=d/c;return c*Math.sqrt(1+e*e)},science.quadratic=function(){function b(b,c,d){var e=c*c-4*b*d;if(e>0){e=Math.sqrt(e)/(2*b);return a?[{r:-c-e,i:0},{r:-c+e,i:0}]:[-c-e,-c+e]}if(e===0){e=-c/(2*b);return a?[{ [...]
\ No newline at end of file
+(function(){science={version:"1.5.0"},science.EULER=.5772156649015329,science.expm1=function(a){return a<1e-5&&a>-0.00001?a+.5*a*a:Math.exp(a)-1},science.functor=function(a){return typeof a=="function"?a:function(){return a}},science.hypot=function(a,b){a=Math.abs(a),b=Math.abs(b);var c,d;a>b?(c=a,d=b):(c=b,d=a);var e=d/c;return c*Math.sqrt(1+e*e)},science.quadratic=function(){function b(b,c,d){var e=c*c-4*b*d;if(e>0){e=Math.sqrt(e)/(2*b);return a?[{r:-c-e,i:0},{r:-c+e,i:0}]:[-c-e,-c+e]} [...]
\ No newline at end of file
diff --git a/src/core/constants.js b/src/core/constants.js
new file mode 100644
index 0000000..e4b5c5e
--- /dev/null
+++ b/src/core/constants.js
@@ -0,0 +1,2 @@
+// Euler's constant.
+science.EULER = .5772156649015329;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/science.js.git



More information about the Pkg-javascript-commits mailing list