Permalink
Browse files

v1.2.5: fix bug found by Michael J.

  • Loading branch information...
Sébastien Loisel
Sébastien Loisel committed Dec 18, 2012
1 parent 8d378ac commit 3cf17f07bbc7a39ce8cc893c16d3d4f184ea6859
Showing with 94 additions and 33 deletions.
  1. +1 −0 benchmark.html
  2. +14 −0 documentation.html
  3. +5 −0 index.php
  4. +22 −0 sitemap.xml
  5. +14 −0 src/documentation.html
  6. +3 −1 src/numeric.js
  7. +28 −26 tools/deploy/mactests.txt
  8. +1 −0 tools/selenium_links.py
  9. +1 −1 tools/workshop.html
  10. +5 −5 workshop.php
View
@@ -1,3 +1,4 @@
+<!doctype html>
<html>
<head>
<link rel="SHORTCUT ICON" href="favicon.ico">
View
@@ -1,3 +1,5 @@
+<!doctype html>
+<html>
<head>
<link rel="SHORTCUT ICON" href="favicon.ico">
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
@@ -1252,6 +1254,18 @@ <h1>Linear programming</h1>
</pre>
-->
+<!--
+Bug found by Michael J.
+<pre>
+IN> numeric.solveLP([1,2,3], /* minimize [1,2,3]*x */
+ [[1, 0, 0], [0, 1, 0], [0, 0, 1],[-1,0,0],[0,-1,0],[0,0,-1]], /* matrix A of inequality constraint */
+ [1,1,1,0,0,0], /* RHS b of inequality constraint */
+ [[1,1,1]], /* matrix Aeq of equality constraint */
+ [3] /* vector beq of equality constraint */
+ );
+OUT> { solution:NaN, message:"Infeasible", iterations:10 }
+</pre>
+-->
<h1>Solving ODEs</h1>
View
@@ -1,5 +1,6 @@
<html>
<head>
+<meta name="google-site-verification" content="wRToy1IFW5JCMZF58VL7Y4Bo0-twB2EGpk1pmMrKsk8" />
<link rel="SHORTCUT ICON" href="favicon.ico">
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="resources/style.css">
@@ -22,7 +23,11 @@
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> <small>(<?php the_time('F j, Y'); ?>)</small>
<?php endwhile;?>
</ul>
+<a href="/wordpress/">More from the blog...</a>
+<?php
+if(file_exists('../wordpress/leaderboard.html')) require('../wordpress/leaderboard.html');
+?>
<div style="float:right; text-align:center; margin-top:15px;">
<a href="workshop.php"><img src="resources/workshop.png" width=400><br>
Numeric Workshop</a>
View
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset
+ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
+ http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
+<url>
+ <loc>http://www.numericjs.com/</loc>
+</url>
+<url>
+ <loc>http://www.numericjs.com/workshop.php</loc>
+</url>
+<url>
+ <loc>http://www.numericjs.com/benchmark.html</loc>
+</url>
+<url>
+ <loc>http://www.numericjs.com/documentation.html</loc>
+</url>
+<url>
+ <loc>http://www.numericjs.com/report.html</loc>
+</url>
+</urlset>
View
@@ -1,3 +1,5 @@
+<!doctype html>
+<html>
<head>
<link rel="SHORTCUT ICON" href="favicon.ico">
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
@@ -1252,6 +1254,18 @@ <h1>Linear programming</h1>
</pre>
-->
+<!--
+Bug found by Michael J.
+<pre>
+IN> numeric.solveLP([1,2,3], /* minimize [1,2,3]*x */
+ [[1, 0, 0], [0, 1, 0], [0, 0, 1],[-1,0,0],[0,-1,0],[0,0,-1]], /* matrix A of inequality constraint */
+ [1,1,1,0,0,0], /* RHS b of inequality constraint */
+ [[1,1,1]], /* matrix Aeq of equality constraint */
+ [3] /* vector beq of equality constraint */
+ );
+OUT> { solution:NaN, message:"Infeasible", iterations:10 }
+</pre>
+-->
<h1>Solving ODEs</h1>
View
@@ -3,7 +3,7 @@
var numeric = (typeof exports === "undefined")?(function numeric() {}):(exports);
if(typeof global !== "undefined") { global.numeric = numeric; }
-numeric.version = "1.2.4";
+numeric.version = "1.2.5";
// 1. Utility functions
numeric.bench = function bench (f,interval) {
@@ -3062,6 +3062,7 @@ numeric.__solveLP = function __solveLP(c,A,b,tol,maxit,x,flag) {
var p = Array(m), A0 = Array(n),e=numeric.rep([n],1), H;
var solve = numeric.solve, z = sub(b,dot(A,x)),count;
var dotcc = dot(c,c);
+ var g;
for(count=i0;count<maxit;++count) {
var i,j,d;
for(i=n-1;i!==-1;--i) A0[i] = div(A[i],z[i]);
@@ -3136,6 +3137,7 @@ numeric.solveLP = function solveLP(c,A,b,Aeq,beq,tol,maxit) {
var c4 = sub(c2,dot(c1,dot(B.I,Aeq2)));
var S = numeric._solveLP(c4,A4,b4,tol,maxit);
var x2 = S.solution;
+ if(x2!==x2) return S;
var x1 = dot(B.I,sub(beq,dot(Aeq2,x2)));
var x = Array(c.length);
for(i=P.length-1;i!==-1;--i) x[P[i]] = x1[i];
View
@@ -197,19 +197,20 @@ Using Chrome
185 PASS: numeric.solveLP([1,1],[[1,0],[0,1]],[0,0]).message; ==> "Unbounded"
186 PASS: numeric.solveLP([1,2,3], /* minimize [1,2,3]*x */ [[-1,0,0],[0,-1,0],[0,0,-1]], /* matrix A of inequality constraint */ [0,0,0], /* RHS b of inequality constraint */ [[1,1,1]], /* matrix Aeq of equality constraint */ [3] /* vector beq of equality constraint */ ); ==> {solution:[3,1.685e-16,4.559e-19],message:"",iterations:12}
187 PASS: n = 7; m = 3; for(k=0;k<10;++k) { A = numeric.random([n,n]); x = numeric.rep([m],1).concat(numeric.rep([n-m],0)); b = numeric.dot(A,x); J = numeric.diag(numeric.rep([n],-1)); B = numeric.blockMatrix([[A , J ], [numeric.neg(A) , J ], [numeric.rep([n,n],0), J ]]); c = b.concat(numeric.neg(b)).concat(numeric.rep([n],0)); d = numeric.rep([n],0).concat(numeric.rep([n],1)); y = numeric.solveLP(d,B,c).solution; y.length = n; foo = numeric.norm2(numeric.sub(x,y)); if(foo>1e-10) throw new Error("solveLP test fails: "+numeric.prettyPrint({A:A,x:x})); } "solveLP tests pass" ==> "solveLPtestspass"
-188 PASS: sol = numeric.dopri(0,1,1,function(t,y) { return y; }) ==> {x:[0,0.1,0.1522,0.361,0.5792,0.7843,0.9813,1],y:[1,1.105,1.164,1.435,1.785,2.191,2.668,2.718],f:[1,1.105,1.164,1.435,1.785,2.191,2.668,2.718],ymid:[1.051,1.134,1.293,1.6,1.977,2.418,2.693],iterations:8,events:,message:""}
-189 PASS: sol.at([0.3,0.7]) ==> [1.35,2.014]
-190 PASS: sol = numeric.dopri(0,10,[3,0],function (x,y) { return [y[1],-y[0]]; }); sol.at([0,0.5*Math.PI,Math.PI,1.5*Math.PI,2*Math.PI]) ==> [[3,0],[-9.534e-8,-3],[-3,2.768e-7],[3.63e-7,3],[3,-3.065e-7]]
-191 PASS: numeric.dopri(0,20,[2,0],function(t,y) { return [y[1], (1-y[0]*y[0])*y[1]-y[0]]; }).at([18,19,20]) ==> [[-1.208,0.9916],[0.4258,2.535],[2.008,-0.04251]]
-192 PASS: sol = numeric.dopri(0,2,1,function (x,y) { return y; },1e-8,100,function (x,y) { return y-1.3; }); ==> {x:[0,0.0181,0.09051,0.1822,0.2624],y:[1,1.018,1.095,1.2,1.3],f:[1,1.018,1.095,1.2,1.3],ymid:[1.009,1.056,1.146,1.249],iterations:5,events:true,message:""}
-193 PASS: sol = numeric.dopri(0,2,1, function(x,y) { return y; }, undefined,50, function(x,y) { return [y-1.5,Math.sin(y-1.5)]; }); ==> {x:[0,0.2,0.4055],y:[1,1.221,1.5],f:[1,1.221,1.5],ymid:[1.105,1.354],iterations:2,events:[true,true],message:""}
-194 PASS: D = numeric.identity(8); d = numeric.rep([8],0); A = [[1, 1, -1, 0, 0, 0, 0, 0, 0, 0],[-1, 1, 0, 1, 0, 0, 0, 0, 0, 0],[1, 1, 0, 0, -1, 0, 0, 0, 0, 0],[-1, 1, 0, 0, 0, 1, 0, 0, 0, 0],[1, 1, 0, 0, 0, 0, -1, 0, 0, 0],[-1, 1, 0, 0, 0, 0, 0, 1, 0, 0],[1, 1, 0, 0, 0, 0, 0, 0, -1, 0],[-1, 1, 0, 0, 0, 0, 0, 0, 0, 1]]; b = [1, 1, -1, 0, -1, 0, -1, 0, -1, 0]; numeric.solveQP(D,d,A,b,undefined,2) ==> {solution:[0.25,0,0.25,0,0.25,0,0.25,0],value:[0.125],unconstrained_solution:[0,0,0,0,0,0,0,0],iterations:[3,0],iact:[1,2,0,0,0,0,0,0,0,0],message:""}
-195 PASS: numeric.imageURL(numeric.rep([3],[[1,2],[3,4]])); ==> "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAH0lEQVQIHQAIAPf/AAEBAQICAgABBwD4/wMDAwQEBAAAogAfhs2H3QAAAABJRU5ErkJggg=="
-196 PASS: numeric.gradient(function(x) { return Math.exp(Math.sin(x[0])*(x[1]+2)); },[1,2]); ==> [62.59,24.37]
-197 PASS: numeric.seedrandom.seedrandom(3); numeric.seedrandom.random() ==> 0.7569
-198 PASS: numeric.seedrandom.random() ==> 0.6139
-199 PASS: numeric.seedrandom.seedrandom(3); numeric.seedrandom.random() ==> 0.7569
-Chrome testing complete. PASS: 200 FAIL: 0 Total: 200
+188 PASS: numeric.solveLP([1,2,3], /* minimize [1,2,3]*x */ [[1, 0, 0], [0, 1, 0], [0, 0, 1],[-1,0,0],[0,-1,0],[0,0,-1]], /* matrix A of inequality constraint */ [1,1,1,0,0,0], /* RHS b of inequality constraint */ [[1,1,1]], /* matrix Aeq of equality constraint */ [3] /* vector beq of equality constraint */ ); ==> {solution:NaN,message:"Infeasible",iterations:10}
+189 PASS: sol = numeric.dopri(0,1,1,function(t,y) { return y; }) ==> {x:[0,0.1,0.1522,0.361,0.5792,0.7843,0.9813,1],y:[1,1.105,1.164,1.435,1.785,2.191,2.668,2.718],f:[1,1.105,1.164,1.435,1.785,2.191,2.668,2.718],ymid:[1.051,1.134,1.293,1.6,1.977,2.418,2.693],iterations:8,events:,message:""}
+190 PASS: sol.at([0.3,0.7]) ==> [1.35,2.014]
+191 PASS: sol = numeric.dopri(0,10,[3,0],function (x,y) { return [y[1],-y[0]]; }); sol.at([0,0.5*Math.PI,Math.PI,1.5*Math.PI,2*Math.PI]) ==> [[3,0],[-9.534e-8,-3],[-3,2.768e-7],[3.63e-7,3],[3,-3.065e-7]]
+192 PASS: numeric.dopri(0,20,[2,0],function(t,y) { return [y[1], (1-y[0]*y[0])*y[1]-y[0]]; }).at([18,19,20]) ==> [[-1.208,0.9916],[0.4258,2.535],[2.008,-0.04251]]
+193 PASS: sol = numeric.dopri(0,2,1,function (x,y) { return y; },1e-8,100,function (x,y) { return y-1.3; }); ==> {x:[0,0.0181,0.09051,0.1822,0.2624],y:[1,1.018,1.095,1.2,1.3],f:[1,1.018,1.095,1.2,1.3],ymid:[1.009,1.056,1.146,1.249],iterations:5,events:true,message:""}
+194 PASS: sol = numeric.dopri(0,2,1, function(x,y) { return y; }, undefined,50, function(x,y) { return [y-1.5,Math.sin(y-1.5)]; }); ==> {x:[0,0.2,0.4055],y:[1,1.221,1.5],f:[1,1.221,1.5],ymid:[1.105,1.354],iterations:2,events:[true,true],message:""}
+195 PASS: D = numeric.identity(8); d = numeric.rep([8],0); A = [[1, 1, -1, 0, 0, 0, 0, 0, 0, 0],[-1, 1, 0, 1, 0, 0, 0, 0, 0, 0],[1, 1, 0, 0, -1, 0, 0, 0, 0, 0],[-1, 1, 0, 0, 0, 1, 0, 0, 0, 0],[1, 1, 0, 0, 0, 0, -1, 0, 0, 0],[-1, 1, 0, 0, 0, 0, 0, 1, 0, 0],[1, 1, 0, 0, 0, 0, 0, 0, -1, 0],[-1, 1, 0, 0, 0, 0, 0, 0, 0, 1]]; b = [1, 1, -1, 0, -1, 0, -1, 0, -1, 0]; numeric.solveQP(D,d,A,b,undefined,2) ==> {solution:[0.25,0,0.25,0,0.25,0,0.25,0],value:[0.125],unconstrained_solution:[0,0,0,0,0,0,0,0],iterations:[3,0],iact:[1,2,0,0,0,0,0,0,0,0],message:""}
+196 PASS: numeric.imageURL(numeric.rep([3],[[1,2],[3,4]])); ==> "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAH0lEQVQIHQAIAPf/AAEBAQICAgABBwD4/wMDAwQEBAAAogAfhs2H3QAAAABJRU5ErkJggg=="
+197 PASS: numeric.gradient(function(x) { return Math.exp(Math.sin(x[0])*(x[1]+2)); },[1,2]); ==> [62.59,24.37]
+198 PASS: numeric.seedrandom.seedrandom(3); numeric.seedrandom.random() ==> 0.7569
+199 PASS: numeric.seedrandom.random() ==> 0.6139
+200 PASS: numeric.seedrandom.seedrandom(3); numeric.seedrandom.random() ==> 0.7569
+Chrome testing complete. PASS: 201 FAIL: 0 Total: 201
Fetching http://numericjs.com/staging/documentation.html
In-browser unit tests.
Using Firefox
@@ -401,16 +402,17 @@ Using Firefox
185 PASS: numeric.solveLP([1,1],[[1,0],[0,1]],[0,0]).message; ==> "Unbounded"
186 PASS: numeric.solveLP([1,2,3], /* minimize [1,2,3]*x */ [[-1,0,0],[0,-1,0],[0,0,-1]], /* matrix A of inequality constraint */ [0,0,0], /* RHS b of inequality constraint */ [[1,1,1]], /* matrix Aeq of equality constraint */ [3] /* vector beq of equality constraint */ ); ==> {solution:[3,1.685e-16,4.559e-19],message:"",iterations:12}
187 PASS: n = 7; m = 3; for(k=0;k<10;++k) { A = numeric.random([n,n]); x = numeric.rep([m],1).concat(numeric.rep([n-m],0)); b = numeric.dot(A,x); J = numeric.diag(numeric.rep([n],-1)); B = numeric.blockMatrix([[A , J ], [numeric.neg(A) , J ], [numeric.rep([n,n],0), J ]]); c = b.concat(numeric.neg(b)).concat(numeric.rep([n],0)); d = numeric.rep([n],0).concat(numeric.rep([n],1)); y = numeric.solveLP(d,B,c).solution; y.length = n; foo = numeric.norm2(numeric.sub(x,y)); if(foo>1e-10) throw new Error("solveLP test fails: "+numeric.prettyPrint({A:A,x:x})); } "solveLP tests pass" ==> "solveLPtestspass"
-188 PASS: sol = numeric.dopri(0,1,1,function(t,y) { return y; }) ==> {x:[0,0.1,0.1522,0.361,0.5792,0.7843,0.9813,1],y:[1,1.105,1.164,1.435,1.785,2.191,2.668,2.718],f:[1,1.105,1.164,1.435,1.785,2.191,2.668,2.718],ymid:[1.051,1.134,1.293,1.6,1.977,2.418,2.693],iterations:8,events:,message:""}
-189 PASS: sol.at([0.3,0.7]) ==> [1.35,2.014]
-190 PASS: sol = numeric.dopri(0,10,[3,0],function (x,y) { return [y[1],-y[0]]; }); sol.at([0,0.5*Math.PI,Math.PI,1.5*Math.PI,2*Math.PI]) ==> [[3,0],[-9.534e-8,-3],[-3,2.768e-7],[3.63e-7,3],[3,-3.065e-7]]
-191 PASS: numeric.dopri(0,20,[2,0],function(t,y) { return [y[1], (1-y[0]*y[0])*y[1]-y[0]]; }).at([18,19,20]) ==> [[-1.208,0.9916],[0.4258,2.535],[2.008,-0.04251]]
-192 PASS: sol = numeric.dopri(0,2,1,function (x,y) { return y; },1e-8,100,function (x,y) { return y-1.3; }); ==> {x:[0,0.0181,0.09051,0.1822,0.2624],y:[1,1.018,1.095,1.2,1.3],f:[1,1.018,1.095,1.2,1.3],ymid:[1.009,1.056,1.146,1.249],iterations:5,events:true,message:""}
-193 PASS: sol = numeric.dopri(0,2,1, function(x,y) { return y; }, undefined,50, function(x,y) { return [y-1.5,Math.sin(y-1.5)]; }); ==> {x:[0,0.2,0.4055],y:[1,1.221,1.5],f:[1,1.221,1.5],ymid:[1.105,1.354],iterations:2,events:[true,true],message:""}
-194 PASS: D = numeric.identity(8); d = numeric.rep([8],0); A = [[1, 1, -1, 0, 0, 0, 0, 0, 0, 0],[-1, 1, 0, 1, 0, 0, 0, 0, 0, 0],[1, 1, 0, 0, -1, 0, 0, 0, 0, 0],[-1, 1, 0, 0, 0, 1, 0, 0, 0, 0],[1, 1, 0, 0, 0, 0, -1, 0, 0, 0],[-1, 1, 0, 0, 0, 0, 0, 1, 0, 0],[1, 1, 0, 0, 0, 0, 0, 0, -1, 0],[-1, 1, 0, 0, 0, 0, 0, 0, 0, 1]]; b = [1, 1, -1, 0, -1, 0, -1, 0, -1, 0]; numeric.solveQP(D,d,A,b,undefined,2) ==> {solution:[0.25,0,0.25,0,0.25,0,0.25,0],value:[0.125],unconstrained_solution:[0,0,0,0,0,0,0,0],iterations:[3,0],iact:[1,2,0,0,0,0,0,0,0,0],message:""}
-195 PASS: numeric.imageURL(numeric.rep([3],[[1,2],[3,4]])); ==> "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAH0lEQVQIHQAIAPf/AAEBAQICAgABBwD4/wMDAwQEBAAAogAfhs2H3QAAAABJRU5ErkJggg=="
-196 PASS: numeric.gradient(function(x) { return Math.exp(Math.sin(x[0])*(x[1]+2)); },[1,2]); ==> [62.59,24.37]
-197 PASS: numeric.seedrandom.seedrandom(3); numeric.seedrandom.random() ==> 0.7569
-198 PASS: numeric.seedrandom.random() ==> 0.6139
-199 PASS: numeric.seedrandom.seedrandom(3); numeric.seedrandom.random() ==> 0.7569
-Firefox testing complete. PASS: 200 FAIL: 0 Total: 200
+188 PASS: numeric.solveLP([1,2,3], /* minimize [1,2,3]*x */ [[1, 0, 0], [0, 1, 0], [0, 0, 1],[-1,0,0],[0,-1,0],[0,0,-1]], /* matrix A of inequality constraint */ [1,1,1,0,0,0], /* RHS b of inequality constraint */ [[1,1,1]], /* matrix Aeq of equality constraint */ [3] /* vector beq of equality constraint */ ); ==> {solution:NaN,message:"Infeasible",iterations:10}
+189 PASS: sol = numeric.dopri(0,1,1,function(t,y) { return y; }) ==> {x:[0,0.1,0.1522,0.361,0.5792,0.7843,0.9813,1],y:[1,1.105,1.164,1.435,1.785,2.191,2.668,2.718],f:[1,1.105,1.164,1.435,1.785,2.191,2.668,2.718],ymid:[1.051,1.134,1.293,1.6,1.977,2.418,2.693],iterations:8,events:,message:""}
+190 PASS: sol.at([0.3,0.7]) ==> [1.35,2.014]
+191 PASS: sol = numeric.dopri(0,10,[3,0],function (x,y) { return [y[1],-y[0]]; }); sol.at([0,0.5*Math.PI,Math.PI,1.5*Math.PI,2*Math.PI]) ==> [[3,0],[-9.534e-8,-3],[-3,2.768e-7],[3.63e-7,3],[3,-3.065e-7]]
+192 PASS: numeric.dopri(0,20,[2,0],function(t,y) { return [y[1], (1-y[0]*y[0])*y[1]-y[0]]; }).at([18,19,20]) ==> [[-1.208,0.9916],[0.4258,2.535],[2.008,-0.04251]]
+193 PASS: sol = numeric.dopri(0,2,1,function (x,y) { return y; },1e-8,100,function (x,y) { return y-1.3; }); ==> {x:[0,0.0181,0.09051,0.1822,0.2624],y:[1,1.018,1.095,1.2,1.3],f:[1,1.018,1.095,1.2,1.3],ymid:[1.009,1.056,1.146,1.249],iterations:5,events:true,message:""}
+194 PASS: sol = numeric.dopri(0,2,1, function(x,y) { return y; }, undefined,50, function(x,y) { return [y-1.5,Math.sin(y-1.5)]; }); ==> {x:[0,0.2,0.4055],y:[1,1.221,1.5],f:[1,1.221,1.5],ymid:[1.105,1.354],iterations:2,events:[true,true],message:""}
+195 PASS: D = numeric.identity(8); d = numeric.rep([8],0); A = [[1, 1, -1, 0, 0, 0, 0, 0, 0, 0],[-1, 1, 0, 1, 0, 0, 0, 0, 0, 0],[1, 1, 0, 0, -1, 0, 0, 0, 0, 0],[-1, 1, 0, 0, 0, 1, 0, 0, 0, 0],[1, 1, 0, 0, 0, 0, -1, 0, 0, 0],[-1, 1, 0, 0, 0, 0, 0, 1, 0, 0],[1, 1, 0, 0, 0, 0, 0, 0, -1, 0],[-1, 1, 0, 0, 0, 0, 0, 0, 0, 1]]; b = [1, 1, -1, 0, -1, 0, -1, 0, -1, 0]; numeric.solveQP(D,d,A,b,undefined,2) ==> {solution:[0.25,0,0.25,0,0.25,0,0.25,0],value:[0.125],unconstrained_solution:[0,0,0,0,0,0,0,0],iterations:[3,0],iact:[1,2,0,0,0,0,0,0,0,0],message:""}
+196 PASS: numeric.imageURL(numeric.rep([3],[[1,2],[3,4]])); ==> "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAH0lEQVQIHQAIAPf/AAEBAQICAgABBwD4/wMDAwQEBAAAogAfhs2H3QAAAABJRU5ErkJggg=="
+197 PASS: numeric.gradient(function(x) { return Math.exp(Math.sin(x[0])*(x[1]+2)); },[1,2]); ==> [62.59,24.37]
+198 PASS: numeric.seedrandom.seedrandom(3); numeric.seedrandom.random() ==> 0.7569
+199 PASS: numeric.seedrandom.random() ==> 0.6139
+200 PASS: numeric.seedrandom.seedrandom(3); numeric.seedrandom.random() ==> 0.7569
+Firefox testing complete. PASS: 201 FAIL: 0 Total: 201
View
@@ -19,6 +19,7 @@ def test(links,driver):
try:
link = driver.find_element_by_id(x[0])
link.click()
+ time.sleep(3)
foo = driver.page_source
driver.back()
assert(x[1] in foo)
View
@@ -9,7 +9,7 @@
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="resources/style.css">
<title>Numeric Javascript: Workshop</title>
-<!--[if lte IE 9]>
+<!--[if lte IE 10]>
<script language="javascript" type="text/javascript" src="tools/excanvas.min.js"></script>
<![endif]-->
<script src="tools/megalib.js"></script>
View
@@ -33,7 +33,7 @@ function con() {
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="resources/style.css">
<title>Numeric Javascript: Workshop</title>
-<!--[if lte IE 9]>
+<!--[if lte IE 10]>
<script language="javascript" type="text/javascript" src="tools/excanvas.min.js"></script>
<![endif]-->
<script src="tools/megalib.js"></script>
@@ -474,7 +474,7 @@ function submit() {
$foo = json_decode($restore,true) or die("json error");
$incs = $foo['scripts'];
if(is_null($incs)) {
- $incs = array(1 => 'lib/numeric-1.2.4.js');
+ $incs = array(1 => 'lib/numeric-1.2.5.js');
}
echo <<<EOT
workshop._restore = $restore;
@@ -484,13 +484,13 @@ function submit() {
workshop._restore = ((typeof localStorage.savedata === "string")?
(JSON.parse(localStorage.savedata)):
{inputs: [], outputs: [],
- scripts: ["lib/numeric-1.2.4.js"] });
+ scripts: ["lib/numeric-1.2.5.js"] });
EOT;
}
?>
-workshop.version = "1.2.4";
-workshop.updateVersion = "lib/numeric-1.2.4.js";
+workshop.version = "1.2.5";
+workshop.updateVersion = "lib/numeric-1.2.5.js";
workshop.preload(workshop._restore);
</script>

0 comments on commit 3cf17f0

Please sign in to comment.