diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..3113b58 --- /dev/null +++ b/bower.json @@ -0,0 +1,22 @@ +{ + "name": "numericjs", + "version": "1.2.6", + "main": "lib/numeric.js", + "description": "Numerical analysis in Javascript", + "license": "MIT", + "repo": "sloisel/numeric" + "ignore": [ + ".jshintrc", + "**/*.txt" + ], + "keywords": [ + "numerical", + "analysis" + ], + "dependencies": { + "seedrandom": "latest", + "quadprog": "lib/quadprog.js", + "sparse2": "lib/sparse2.js", + "svd": "lib/svd.js", + } +} diff --git a/src/numeric.js b/src/numeric.js index 537b68f..ce2c028 100644 --- a/src/numeric.js +++ b/src/numeric.js @@ -56,9 +56,9 @@ numeric.prettyPrint = function prettyPrint(x) { if(typeof x === "string") { ret.push('"'+x+'"'); return false; } if(typeof x === "boolean") { ret.push(x.toString()); return false; } if(typeof x === "number") { - var a = fmtnum(x); + var a = parseFloat(x.toString()).toString(); var b = x.toPrecision(numeric.precision); - var c = parseFloat(x.toString()).toString(); + var c = fmtnum(x); var d = [a,b,c,parseFloat(b).toString(),parseFloat(c).toString()]; for(k=1;k