Releases: keep94/sqroot
Releases · keep94/sqroot
v3.7.0
v3.6.1
v3.6.0
New Features
- Introduce NewFiniteNumber() function which works like NewNumberForTesting() except that it creates FiniteNumbers.
- NewNumberForTesting returns a *FiniteNumber if caller gives no repeating digits.
Bug fixes
- FiniteNumber.Exact() behaviour changed so that it behaves exactly like the String() method when there are fewer than 16 digits in the mantissa. Before FiniteNumber.Exact() would revert to scientific notation if there were very few significant digits. For example it would wrongfully give "0.12e+04" instead of "1200".
v3.5.0
New Features
- Utilise go 1.23 iterators
- Add All() method to Sequence
- Add Backward() method to FiniteSequence
- Add All() method to Positions
- Add Matches() to return all the matches of a pattern in a Sequence
- Add BackwardMatches() to return all the matches of a pattern in a FiniteSequence from end to beginning
Requirements
- This version requires go 1.23 or later. For older versions of go, use v3.4.9
v3.4.9
Bug Fixes
- Fix iterators over Sequence and FiniteSequence so that they are always cheap to create. Expensive computations are deferred until the iterator is actually used. This makes reasoning about the performance of code that uses iterators easier.
- Tradeoff: when digits are precomputed, forward iterating over a sequence is 20% slower, and reverse iterating over a finite sequence is 40% slower. This tradeoff is acceptable since one forward iteration over precomputed digits now takes approximately 3.6 nanoseconds, and one reverse iteration takes approximately 3.2 nanoseconds.
v3.4.8
v3.4.7
v3.4.6
v3.4.5
Clarify that a Sequence can have no gaps
Documentation Updates
- Clarify that a Sequence must be contiguous.
- Explain how a zero Number works
Code Changes
- Remove checks in FindXXX methods that did not assume that a Sequence is contiguous