Skip to content

Releases: EricRovell/rational

v1.0.1: Update dependencies

22 Mar 12:37
Compare
Choose a tag to compare

1.0.1 (2024-03-22)

  • [chore]: update dependencies and building processes;
  • [chore]: bundle type definitions into one file;

v1.0.0: First Major Release

11 Oct 11:11
Compare
Choose a tag to compare
  • [breaking]: .toDecimalString() and .toFractionString() is removed in favor for improved .toString() method to not dublicate the functionality;
  • [feat]: expose input types for a user;
  • [feat]: improve .valueOf(places?) method with optional argument to round the decimal approximation;
  • [feat]: implement .continued for continued fraction representation;

Fixed ESM Module path

25 Aug 11:53
Compare
Choose a tag to compare
  • [fix]: Incorrect ESM Module path;

Test coverage improvements and fixes

22 Aug 11:52
0922d76
Compare
Choose a tag to compare
  • [improvement]: Improved test coverage to 99.63%;
  • [fix]: Invalid results for exponentiation;
  • [fix]: Invalid type handling for repeating decimal inputs;

More math, representation, input types and fixes

19 Aug 19:54
0f46184
Compare
Choose a tag to compare
  • [feature]: new type of input, degrees value object;
  • [feature]: new type of input, repeating decimal object;
  • [feature]: .repeating property for repeating decimals checks;
  • [fix]: invalid .proper property check for negative rationals;
  • [feature]: .toDecimalString(places) method for transforming rational numbers into decimal strings. Handles repeating decimals;
  • [feature]: .toFractionString() method for transforming rational numbers into fractional strings. Differs from .toString() by producing proper fractions by default;
  • [fix]: .integralPart invalid calculation for negative values;
  • [feature]: .gcd() method for calculating GCD of two rational numbers;
  • [feature]: .lcm() method for calculating LCM of two rational numbers;
  • [feature]: .divisible() method for divisibility checks;
  • [feature]: .valueOf() method for transformation into decimal and coercion;

New input types and more math operations

16 Aug 21:41
Compare
Choose a tag to compare
  • [improvement]: fractional string input can include integral part separated with whitespace: "1 2/3";
  • [feature]: new type of input, degrees/minutes/seconds string: (1.23'45'');
  • [feature]: .mod() method for calculating the modulo of two rational numbers;
  • [feature]: .mathmod() method for calculating the mathematical correct modulo of two rational numbers;
  • [feature]: .pow() method for exponentiation of rational numbers.

Parsing improvements

15 Aug 12:57
c987aac
Compare
Choose a tag to compare
  • [feature]: new type of input, string in a form of fraction ("1/2");
  • [feature]: new type of input, string in a form of repeating decimal (".(1)", "1.23(456)");
  • [improvement]: fractional object type extended, now the parser handles the integral parts of the fraction;

Rounding, absolute value. fixed types and CJS/ESM support

13 Aug 09:27
Compare
Choose a tag to compare
  • [improvement]: CommonJS support;
  • [feature]: .abs property to get absolute value of the rational number;
  • [feature]: comparison between rational numbers via .compare(rational) method;
  • [feature]: .round(), .ceil(), and floor() method to perform round operations on rational numbers;
  • [fix]: package types inferred properly;

v0.1.0: Basic API

28 Jul 13:34
Compare
Choose a tag to compare
v0.1.0: Basic API Pre-release
Pre-release
add: updated getting started && badges