| Summary: | Factorial(13) does not return correct results, factorial(12) is correct. | ||
|---|---|---|---|
| Product: | [Applications] kalgebra | Reporter: | Sebastian J. <gerdroot> |
| Component: | general | Assignee: | Aleix Pol <aleixpol> |
| Status: | CONFIRMED --- | ||
| Severity: | grave | ||
| Priority: | NOR | ||
| Version First Reported In: | 0.11 | ||
| Target Milestone: | --- | ||
| Platform: | Mint (Ubuntu based) | ||
| OS: | Linux | ||
| URL: | http://abload.de/img/factorial_13_is_wrong7isuq.png | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
Screenshot for easy understanding...
KAlgebra script for your convenience |
||
|
Description
Sebastian J.
2016-04-30 16:50:24 UTC
Created attachment 98709 [details]
Screenshot for easy understanding...
Screenshot for easy understanding...
Created attachment 98710 [details]
KAlgebra script for your convenience
KAlgebra script for your convenience
Git commit 5c4ff0778bead3e80299b58dae43c32b7b1f6d8c by Aleix Pol. Committed on 01/05/2016 at 22:51. Pushed by apol into branch 'master'. Use cmath implementation for factorial M +3 -8 analitza/operations.cpp M +3 -0 analitza/tests/analitzatest.cpp http://commits.kde.org/analitza/5c4ff0778bead3e80299b58dae43c32b7b1f6d8c That's a technology limitation. You're hitting the precision limit c++ double has. Maybe we should adopt a multi precision library. What's your use case? (In reply to Aleix Pol from comment #4) > What's your use case? My usecase? permutations and probabilities... you can't avoid factorials of big numbers. Just calculate the possible combinations of e.g. lottery examples. |