Skip to content

Releases: fast-reflexes/BirthdayProblem-Python

Version 1.4.2

10 Mar 12:07
80993e5
Compare
Choose a tag to compare
  • Fix bug where wrong method flag was returned when using combinations (-c flag) and D 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 input D is larger than 15 (e.g. resulting D is (2^(15))!).

Version 1.4.1

28 Jan 10:20
Compare
Choose a tag to compare
  • Documentation, text and smaller fixes forgotten in v. 1.4.
  • Added tests where the project is used as a library (previous tests only used the project's command line API).

Version 1.4

24 Jan 12:15
Compare
Choose a tag to compare
  • Added exact method for calculating N given D and P 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 using D and P when D is 1 and P is neither 0 nor 1 (in this case
    the answer is always 2).

Version 1.3

25 Jan 06:58
Compare
Choose a tag to compare
  • 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.
  • Corrected minor bug in _BirthdayProblemTextFormatter.methodToText.
  • Simplified _BirthdayProblemTextFormatter.methodToText and _BirthdayProblemTextFormatter.methodToDescription.

Version 1.2

07 Dec 21:05
Compare
Choose a tag to compare
  • Corrected calculation of adjusted precision during calculations.
  • Added constants for repeatedly used values and replaced relevant uses.
  • Corrected exact / naive calculation of m take n.
  • 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

29 Nov 13:40
Compare
Choose a tag to compare
  • 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.