Skip to content

Commit

Permalink
Merge pull request #73 from gghanak/patch-3
Browse files Browse the repository at this point in the history
Update to correct Factorial computation
  • Loading branch information
davedelong committed Apr 14, 2014
2 parents ecc0b73 + e2397f9 commit cf683ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DDMathParser/_DDPrecisionFunctionEvaluator.m
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ - (DDExpression *)factorial:(NSArray *)arguments variables:(NSDictionary *)varia
total = DDDecimalMultiply(total, decimal);
decimal = DDDecimalSubtract(decimal, one);
}
result = [NSDecimalNumber decimalNumberWithDecimal:decimal];
result = [NSDecimalNumber decimalNumberWithDecimal:total];
} else {
result = @(NAN);
}
Expand Down

0 comments on commit cf683ad

Please sign in to comment.