You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Christian Semrau (JIRA)" <ji...@apache.org> on 2009/01/16 23:29:59 UTC

[jira] Created: (MATH-239) Add gcd and lcm for long values in MathUtils

Add gcd and lcm for long values in MathUtils
--------------------------------------------

                 Key: MATH-239
                 URL: https://issues.apache.org/jira/browse/MATH-239
             Project: Commons Math
          Issue Type: New Feature
            Reporter: Christian Semrau
            Priority: Minor


I suggest adding MathUtils.gcd and MathUtils.lcm for long values in addition to the methods for int values.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MATH-239) Add gcd and lcm for long values in MathUtils

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795214#action_12795214 ] 

Sebb commented on MATH-239:
---------------------------

Note: the @since tags need fixing.

> Add gcd and lcm for long values in MathUtils
> --------------------------------------------
>
>                 Key: MATH-239
>                 URL: https://issues.apache.org/jira/browse/MATH-239
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Christian Semrau
>            Assignee: Phil Steitz
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: gcdForLong.txt
>
>
> I suggest adding MathUtils.gcd and MathUtils.lcm for long values in addition to the methods for int values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MATH-239) Add gcd and lcm for long values in MathUtils

Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794829#action_12794829 ] 

Luc Maisonobe commented on MATH-239:
------------------------------------

I don't think parsing the error messages for verification is a good thing.
They are intended for user display, not for automatic parsing. They will also change according to the localization setting of the computer running the test.
Apart from this, the patch could probably be applied now. Has someone verified it ?

> Add gcd and lcm for long values in MathUtils
> --------------------------------------------
>
>                 Key: MATH-239
>                 URL: https://issues.apache.org/jira/browse/MATH-239
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Christian Semrau
>            Assignee: Phil Steitz
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: gcdForLong.txt
>
>
> I suggest adding MathUtils.gcd and MathUtils.lcm for long values in addition to the methods for int values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MATH-239) Add gcd and lcm for long values in MathUtils

Posted by "Christian Semrau (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Semrau updated MATH-239:
----------------------------------

    Attachment: gcdForLong.txt

The long versions of gcd and lcm are adapted copies of the int versions.

I added some verification of exception messages to the tests, because I saw the change to gcd(int, int) where the exception message now contains the illegal arguments. To facilitate these (and possibly other) verifications, I added TestUtils.assertMessageContains(). Two of these verifications fail, because the exception is thrown by mulAndCheck without the illegal arguments; they are commented.


> Add gcd and lcm for long values in MathUtils
> --------------------------------------------
>
>                 Key: MATH-239
>                 URL: https://issues.apache.org/jira/browse/MATH-239
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Christian Semrau
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: gcdForLong.txt
>
>
> I suggest adding MathUtils.gcd and MathUtils.lcm for long values in addition to the methods for int values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MATH-239) Add gcd and lcm for long values in MathUtils

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794837#action_12794837 ] 

Phil Steitz commented on MATH-239:
----------------------------------

Not yet.  On my list.  Go ahead if you have the cycles.

> Add gcd and lcm for long values in MathUtils
> --------------------------------------------
>
>                 Key: MATH-239
>                 URL: https://issues.apache.org/jira/browse/MATH-239
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Christian Semrau
>            Assignee: Phil Steitz
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: gcdForLong.txt
>
>
> I suggest adding MathUtils.gcd and MathUtils.lcm for long values in addition to the methods for int values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (MATH-239) Add gcd and lcm for long values in MathUtils

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz closed MATH-239.
----------------------------


> Add gcd and lcm for long values in MathUtils
> --------------------------------------------
>
>                 Key: MATH-239
>                 URL: https://issues.apache.org/jira/browse/MATH-239
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Christian Semrau
>            Assignee: Phil Steitz
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: gcdForLong.txt
>
>
> I suggest adding MathUtils.gcd and MathUtils.lcm for long values in addition to the methods for int values.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (MATH-239) Add gcd and lcm for long values in MathUtils

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz resolved MATH-239.
------------------------------

    Resolution: Fixed

Pacth applied in r894730 with the following modifications

* Removed the test methods that inspect error messages as I agree with Luc's comments on this
* Added an additional test case comparing long and int results
* Updated message resources with the new error messages

Thanks for the patch!

> Add gcd and lcm for long values in MathUtils
> --------------------------------------------
>
>                 Key: MATH-239
>                 URL: https://issues.apache.org/jira/browse/MATH-239
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Christian Semrau
>            Assignee: Phil Steitz
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: gcdForLong.txt
>
>
> I suggest adding MathUtils.gcd and MathUtils.lcm for long values in addition to the methods for int values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MATH-239) Add gcd and lcm for long values in MathUtils

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz updated MATH-239:
-----------------------------

    Fix Version/s: 2.1

Patches welcome!

Putting fix version at 2.1, as this is not a showstopper for 2.0, but will review / apply if we get a patch in time for 2.0

> Add gcd and lcm for long values in MathUtils
> --------------------------------------------
>
>                 Key: MATH-239
>                 URL: https://issues.apache.org/jira/browse/MATH-239
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Christian Semrau
>            Priority: Minor
>             Fix For: 2.1
>
>
> I suggest adding MathUtils.gcd and MathUtils.lcm for long values in addition to the methods for int values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.