You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2019/06/27 14:52:15 UTC

[commons-numbers] branch master updated (860adcd -> b3890a0)

This is an automated email from the ASF dual-hosted git repository.

erans pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git.


    from 860adcd  Merge branch 'NUMBERS-118__heinrich'
     new ada53f5  NUMBERS-121: Replace usages of deprecated HTML tag <tt> with MathJax
     new a10fded  Merge branch 'NUMBERS-121__heinrich'
     new be7af9c  NUMBERS-122: Make assertFraction(long, long, BigFraction) compare the full numerator and denominator
     new b3890a0  Merge branch 'NUMBERS-122__heinrich'

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/commons/numbers/fraction/BigFraction.java   | 14 +++++++-------
 .../apache/commons/numbers/fraction/BigFractionTest.java   |  9 ++-------
 2 files changed, 9 insertions(+), 14 deletions(-)


[commons-numbers] 04/04: Merge branch 'NUMBERS-122__heinrich'

Posted by er...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

erans pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit b3890a0e5568f554cafff270b19c99dd932a4346
Merge: a10fded be7af9c
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
AuthorDate: Thu Jun 27 16:51:19 2019 +0200

    Merge branch 'NUMBERS-122__heinrich'
    
    Closes #59.

 .../org/apache/commons/numbers/fraction/BigFractionTest.java     | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)


[commons-numbers] 02/04: Merge branch 'NUMBERS-121__heinrich'

Posted by er...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

erans pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit a10fded9668ef94d3d400acec2d3400dc2aa20e0
Merge: 860adcd ada53f5
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
AuthorDate: Thu Jun 27 16:49:01 2019 +0200

    Merge branch 'NUMBERS-121__heinrich'
    
    Closes #58.

 .../org/apache/commons/numbers/fraction/BigFraction.java   | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)


[commons-numbers] 01/04: NUMBERS-121: Replace usages of deprecated HTML tag with MathJax

Posted by er...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

erans pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit ada53f58bc6153e6f1ddc3b94beee30499a48d69
Author: Schamschi <he...@gmx.at>
AuthorDate: Wed Jun 26 23:50:33 2019 +0200

    NUMBERS-121: Replace usages of deprecated HTML tag <tt> with MathJax
---
 .../org/apache/commons/numbers/fraction/BigFraction.java   | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/BigFraction.java b/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/BigFraction.java
index eff4c83..a440261 100644
--- a/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/BigFraction.java
+++ b/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/BigFraction.java
@@ -961,7 +961,7 @@ public class BigFraction extends Number implements Comparable<BigFraction>, Seri
      * @param exponent
      *            exponent to which this {@code BigFraction} is to be
      *            raised.
-     * @return <tt>this<sup>exponent</sup></tt>.
+     * @return \(\mathit{this}^{\mathit{exponent}}\).
      */
     public BigFraction pow(final int exponent) {
         if (exponent == 0) {
@@ -980,12 +980,12 @@ public class BigFraction extends Number implements Comparable<BigFraction>, Seri
     /**
      * <p>
      * Returns a <code>BigFraction</code> whose value is
-     * <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form.
+     * \(\mathit{this}^{\mathit{exponent}}\), returning the result in reduced form.
      * </p>
      *
      * @param exponent
      *            exponent to which this <code>BigFraction</code> is to be raised.
-     * @return <tt>this<sup>exponent</sup></tt> as a <code>BigFraction</code>.
+     * @return \(\mathit{this}^{\mathit{exponent}}\) as a <code>BigFraction</code>.
      */
     public BigFraction pow(final long exponent) {
         if (exponent == 0) {
@@ -1006,12 +1006,12 @@ public class BigFraction extends Number implements Comparable<BigFraction>, Seri
     /**
      * <p>
      * Returns a <code>BigFraction</code> whose value is
-     * <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form.
+     * \(\mathit{this}^{\mathit{exponent}}\), returning the result in reduced form.
      * </p>
      *
      * @param exponent
      *            exponent to which this <code>BigFraction</code> is to be raised.
-     * @return <tt>this<sup>exponent</sup></tt> as a <code>BigFraction</code>.
+     * @return \(\mathit{this}^{\mathit{exponent}}\) as a <code>BigFraction</code>.
      */
     public BigFraction pow(final BigInteger exponent) {
         if (exponent.signum() == 0) {
@@ -1033,12 +1033,12 @@ public class BigFraction extends Number implements Comparable<BigFraction>, Seri
     /**
      * <p>
      * Returns a <code>double</code> whose value is
-     * <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form.
+     * \(\mathit{this}^{\mathit{exponent}}\), returning the result in reduced form.
      * </p>
      *
      * @param exponent
      *            exponent to which this <code>BigFraction</code> is to be raised.
-     * @return <tt>this<sup>exponent</sup></tt>.
+     * @return \(\mathit{this}^{\mathit{exponent}}\).
      */
     public double pow(final double exponent) {
         return Math.pow(numerator.doubleValue(),   exponent) /


[commons-numbers] 03/04: NUMBERS-122: Make assertFraction(long, long, BigFraction) compare the full numerator and denominator

Posted by er...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

erans pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit be7af9c7357f69ce46a59f80783d45e14ea471da
Author: Schamschi <he...@gmx.at>
AuthorDate: Thu Jun 27 13:45:55 2019 +0200

    NUMBERS-122: Make assertFraction(long, long, BigFraction) compare the full numerator and denominator
---
 .../org/apache/commons/numbers/fraction/BigFractionTest.java     | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/commons-numbers-fraction/src/test/java/org/apache/commons/numbers/fraction/BigFractionTest.java b/commons-numbers-fraction/src/test/java/org/apache/commons/numbers/fraction/BigFractionTest.java
index 0990357..2b0b377 100644
--- a/commons-numbers-fraction/src/test/java/org/apache/commons/numbers/fraction/BigFractionTest.java
+++ b/commons-numbers-fraction/src/test/java/org/apache/commons/numbers/fraction/BigFractionTest.java
@@ -27,14 +27,9 @@ import org.junit.jupiter.api.Test;
 
 public class BigFractionTest {
 
-    private void assertFraction(int expectedNumerator, int expectedDenominator, BigFraction actual) {
-        Assertions.assertEquals(expectedNumerator, actual.getNumeratorAsInt());
-        Assertions.assertEquals(expectedDenominator, actual.getDenominatorAsInt());
-    }
-
     private void assertFraction(long expectedNumerator, long expectedDenominator, BigFraction actual) {
-        Assertions.assertEquals(expectedNumerator, actual.getNumeratorAsLong());
-        Assertions.assertEquals(expectedDenominator, actual.getDenominatorAsLong());
+        Assertions.assertEquals(BigInteger.valueOf(expectedNumerator), actual.getNumerator());
+        Assertions.assertEquals(BigInteger.valueOf(expectedDenominator), actual.getDenominator());
     }
 
     @Test