You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "orionlibs (via GitHub)" <gi...@apache.org> on 2023/07/13 15:33:13 UTC

[GitHub] [commons-numbers] orionlibs opened a new pull request, #130: [NUMBERS]: implemented method that determines if 2 integers are relat…

orionlibs opened a new pull request, #130:
URL: https://github.com/apache/commons-numbers/pull/130

   overloaded method that determines if 2 integers are relatively prime or coprime. Included tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-numbers] orionlibs commented on pull request #130: [NUMB-194]: method that determines if 2 integers are coprime

Posted by "orionlibs (via GitHub)" <gi...@apache.org>.
orionlibs commented on PR #130:
URL: https://github.com/apache/commons-numbers/pull/130#issuecomment-1634525414

   > These are simply pass through methods for `ArithmeticUtils.gcd` where gcd == 1.
   > 
   > The new methods do not include a link to `gcd` and also lose all the javadoc on the special cases for that method, including exception cases. Adding these methods brings in the dependency on the core module and bloats the primes module. I believe it better to add javadoc to the Primes class to sign post users to ArithmeticUtils, e.g. in the class javadoc:
   > 
   > ```
   >  * <p>Additional methods for integer arithmetic can be found in the Numbers core module in
   >  * {@code o.a.c.numbers.core.ArithmeticUtils}. This includes a method to obtain the
   >  * greatest common divisor (GCD) of two integers which can be used to determine if two numbers
   >  * are relatively prime.
   > ```
   > 
   > Thus users can bring in that dependency if they require.
   
   @aherbert  hello. I am sorry, but how can I implement the function using ArithmeticUtils:gcd without importing the core module? What is the procedure in such cases?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-numbers] orionlibs closed pull request #130: [NUMB-194]: method that determines if 2 integers are coprime

Posted by "orionlibs (via GitHub)" <gi...@apache.org>.
orionlibs closed pull request #130: [NUMB-194]: method that determines if 2 integers are coprime
URL: https://github.com/apache/commons-numbers/pull/130


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-numbers] aherbert commented on pull request #130: [NUMBERS]: implemented method that determines if 2 integers are relat…

Posted by "aherbert (via GitHub)" <gi...@apache.org>.
aherbert commented on PR #130:
URL: https://github.com/apache/commons-numbers/pull/130#issuecomment-1634514221

   These are simply pass through methods for `ArithmeticUtils.gcd` where gcd == 1.
   
   The new methods do not include a link to `gcd` and also lose all the javadoc on the special cases for that method, including exception cases. Adding these methods brings in the dependency on the core module and bloats the primes module. I believe it better to add javadoc to the Primes class to sign post users to ArithmeticUtils, e.g. in the class javadoc:
   
   ```
    * <p>Additional methods for integer arithmetic can be found in the Numbers core module in
    * {@code o.a.c.numbers.core.ArithmeticUtils}. This includes a method to obtain the
    * greatest common divisor (GCD) of two integers which can be used to determine if two numbers
    * are relatively prime.
   ```
   
   Thus users can bring in that dependency if they require.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-numbers] orionlibs commented on pull request #130: [NUMB-194]: method that determines if 2 integers are coprime

Posted by "orionlibs (via GitHub)" <gi...@apache.org>.
orionlibs commented on PR #130:
URL: https://github.com/apache/commons-numbers/pull/130#issuecomment-1634539995

   > I was stating that this entire PR should be dropped and replaced with some better documentation in the Primes class header to indicate that the functionality to detect relatively prime numbers can be found in ArithmeticUtils.
   
   @aherbert not every dev knows that checking for coprimes requires a GCD calculation, but they do know what coprimes require a primes utility. So, they will use the Primes class to see what kinds of methods it has. It will not occur to them to go to the ArithmeticUtils to check specifically the GCD method JavaDoc. I can add your suggested JavaDoc to the GCD methods, of course, but.............


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-numbers] aherbert commented on pull request #130: [NUMB-194]: method that determines if 2 integers are coprime

Posted by "aherbert (via GitHub)" <gi...@apache.org>.
aherbert commented on PR #130:
URL: https://github.com/apache/commons-numbers/pull/130#issuecomment-1634533199

   I was stating that this entire PR should be dropped and replaced with some better documentation in the Primes class header to indicate that the functionality to detect relatively prime numbers can be found in ArithmeticUtils.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org