Skip to content

2023.1000.1.255 - Semantic Versioning and StrongNaming

Latest
Compare
Choose a tag to compare
@AdamWhiteHat AdamWhiteHat released this 12 Sep 23:35
· 1 commit to master since this release

2023.1000.1.255 - Semantic Versioning and StrongNaming

NuGet

Change Log

Full Changelog: 2.0...3.0
Compare the Commits: d2f0dd4...cb770ae

Full Changelog (in order from newest to oldest):
‒ Added an exponentiation by squaring Pow method for BigIntegers.
‒ Improved the Fraction.Pow method, simplifying it and making it more performant by leveraging the above exponentiation by squaring algorithm on (big) integers.
‒ Added a Fraction.Pow method overload that allows the exponent parameter to be of type Fraction, allowing Fractions to be raised to the power of Fractions.
‒ Fraction.NthRoot now takes a BigInteger for the root parameter instead of an int, since there was no technical reason for limiting it to an signed int32. Taking a root greater than 2^31 of some number is unlikely to be useful to anyone in practice, but it simplifies calling the method internally.
‒ Fraction.NthRoot no longer requires that the root parameter to be greater than 1.
‒ Added tests of the new functionality.

Begin semantic versioning at 2023.1000.0.* (No breaking changes from last version to this one, despite the major version change to 1000)
Add strong naming of assembly.

Issue #14: Unary plus was returning the absolute value of the operand.
According to Microsoft, "The unary + operator returns the value of its operand."
See: https://learn.microsoft.com/en‒us/dotnet/csharp/language‒reference/operators/arithmetic‒operators#unary‒plus‒and‒minus‒operators/

Issue #13: Numbers with WholePart zero have incorrect Sign.
‒ Changes to the following methods required: BigRational.Negate, BigRational.Compare and explicit conversion to double and decimal conversion methods.
‒ Added tests covering cases where WholePart is zero.
‒ Improved messaging on some test cases.

Issue #12: Fix sqrt.
‒ Updated Fraction.Sqrt to use new Nth root algorithm.

‒ Added XML comments for every method and property of the BigRational class.
‒ Added XML comments for every method and property of the Fraction class.

Issue #11: Fix NthRoot Method.
NthRoot now works correctly. Confirmed by new added tests.
‒ NthRoot now takes a precision parameter for when the answer is an irrational number.
‒ If the answer's numerator is divided by the denominator and written as a decimal number expansion, number of correct decimal digits will be at least the quantity given by the precision parameter.
‒ Added a new method to the Fraction class: Mediant.

Added explicit conversion from a Fraction to a BigInteger

‒ Removed x86/64x only platforms; Prefer AnyCPU instead.
‒ Added additional TargetFrameworks: net45;net46;net5.0;net7.0. This brings it in line with all my other math/arithmetic libraries which all support the same set of frameworks.
‒ Test Project ‒ Downgraded NUnit3TestAdapter to Version 4.1.0. Higher versions will not 'discover' .NET 4.5, 4.6 or 4.8. Also downgraded Microsoft.NET.Test.Sdk to 17.1.0.
‒ Updated README.md with class signature (so people can see what methods the class supports).

Added node to project file, so include the README.md file when packing .nuget package.

Fixed bug where value of BigDecimal would be zero if whole part was zero when casting to double or decimal.
Added tests covering this condition plus a few others.

Replaced Square Root method with an implementation that is asymptotically faster.
The old implementation was beginning to see slowdowns with numbers the size of 5,000 digits, with execution times growing quickly from there.

The code is not as nearly nice to read, but this was a limitation I was running into and had to be fixed.

Added BigRational.Sqrt, BigRational.NthRoot, Fraction.Sqrt, Fraction.NthRoot
Added tests for the above 4 methods

‒ Added new constructor with numerator & denominator.
‒ Added mod operator %
‒ Added tests for Fraction.Parse(string)

More implicit conversions
Simplify names