Skip to content

Releases: keep94/sqroot

v3.7.0

20 Nov 04:19
Compare
Choose a tag to compare

New Features

  • Introduce Values method on Sequence interface

v3.6.1

30 Oct 02:06
Compare
Choose a tag to compare

Documentation Improvements

  • Simplify documentation for FiniteNumber usage.

v3.6.0

12 Sep 11:24
Compare
Choose a tag to compare

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

17 Aug 00:59
Compare
Choose a tag to compare

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

03 Jul 02:03
Compare
Choose a tag to compare

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

31 May 11:24
Compare
Choose a tag to compare

Code Cleanup

  • withLimit function to work with any numberSpec implementation.
  • Improve test coverage.

v3.4.7

14 May 04:07
Compare
Choose a tag to compare

Performance

  • When digits are precomputed, forward iterating over a FiniteSequence is more than twice as fast than before.
  • When digits are precomputed, forward iterating over a Sequence is also faster than before.

Documentation

  • Revised README

v3.4.6

09 May 13:37
Compare
Choose a tag to compare

Documentation Updates

  • Add overview section in documentation.

v3.4.5

22 Apr 04:18
Compare
Choose a tag to compare
  • Update dependencies.
  • Refactor non exported functions formatSpec.printSci and printFixed to take mantissa and exponent instead of FiniteNumber and exponent.

Clarify that a Sequence can have no gaps

14 Apr 19:54
Compare
Choose a tag to compare

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