Skip to content

Commit 810d1f2

Browse files
committed
Fix a mistake in numeric js regarding the reciprocal of a real number.
See sloisel/numeric#59 for an upstream pull request.
1 parent 9a4f1ef commit 810d1f2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/js/lib/numeric-1.2.6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ numeric.T.prototype.reciprocal = function reciprocal() {
10711071
var d = numeric.add(mul(this.x,this.x),mul(this.y,this.y));
10721072
return new numeric.T(div(this.x,d),div(numeric.neg(this.y),d));
10731073
}
1074-
return new T(div(1,this.x));
1074+
return new numeric.T(div(1,this.x), 0);
10751075
}
10761076
numeric.T.prototype.div = function div(y) {
10771077
if(!(y instanceof numeric.T)) y = new numeric.T(y);

0 commit comments

Comments
 (0)