Releases: fast-reflexes/BirthdayProblem-Kotlin
Releases · fast-reflexes/BirthdayProblem-Kotlin
Version 1.4.2
- Fix bug where wrong method flag was returned when using combinations (
-c
flag) andD
could not be calculated due to size. - Replaced calculation of
D
when combinations is used (flag-c
) with an exact method in all cases except for when both binary and combinations are used (-b
and-c
flag) and inputD
is larger than 15 (e.g. resultingD
is(2^(15))!
).
Version 1.4.1
- Added exact method for calculating
N
givenD
andP
using a numerical approach, this means that from now on
multiple solution strategies can be used for this calculation as well (earlier this calculation always used Taylor
approximation). - Fixed bug in method
facultyLog
for when input is 0. Since 0! = 1 and the return value is in log space, the
correct answer is 0 and not 1. - Added trivial use case for calculating
N
usingD
andP
whenD
is 1 andP
is neither 0 nor 1 (in this case
the answer is always 2).
Version 1.3
- Improved exception handling:
- Error codes
- Exception class
- Improved checks on input sizes before starting calculations
- Returning error codes when terminating program with an error
- Returning more specific error messages when a method fails
- Simplified conversion to log10 form in
BirthdayProblemNumberFormatter.toLog10ReprOrNone
. - Corrected precision bug in
BirthdayProblemSolverChecked.birthdayProblemInv
.
Version 1.2
- Corrected calculation of adjusted precision during calculations.
- Added constants for repeatedly used values and replaced relevant uses.
- Adjusted method using Stirling's formula so that it always returns probablity 0 or more (can otherwise return slightly less than 0 due to precision errors).
- Changed preprocessing so that the application fails whenever the max precision is insufficient to represent the resulting log of set size
D
. - Small vocabular fixes in descriptions and comments.
- Fixed tests.
Version 1.1
- Added rounding upwards (ceiling) instead of regular rounding (half up) on non-logarithmic solutions for
N
. - Removed output approximation character on non-logarithmic solutions for
N
. - Added flag
--prec
for command-line interface allowing the user to choose output precision, where applicable, in [0, 10] with default 10.
Version 1.0
First fully functional version.