commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Brampton (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MATH-1083) Fraction - Allow zero denominator if numerator is also zero
Date Mon, 23 Dec 2013 00:34:50 GMT

     [ https://issues.apache.org/jira/browse/MATH-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrew Brampton updated MATH-1083:
----------------------------------

    Description: 
The Fraction constructor rejects a denominator of zero. However, while trying to parse some
Strings generated by another program, I encountered a fraction "0/0". I would say that's ambiguous
as to if that's valid, but some people would agree the answer is zero.

So, would it be possible to allow a zero denominator if the numerator is also zero. I'd be
happy to provide a patch.

  was:
The Fraction constructor rejects a denominator of zero. However, while trying to parse some
Strings generated by another program, I encountered a fraction "0/0". I would say that's ambigous
as to if that's valid, but some people would agree the answer is zero.

So, would it be possible to allow a zero denominator if the numerator is also zero. I'd be
happy to provide a patch.


> Fraction - Allow zero denominator if numerator is also zero
> -----------------------------------------------------------
>
>                 Key: MATH-1083
>                 URL: https://issues.apache.org/jira/browse/MATH-1083
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Andrew Brampton
>            Priority: Minor
>              Labels: Fraction
>
> The Fraction constructor rejects a denominator of zero. However, while trying to parse
some Strings generated by another program, I encountered a fraction "0/0". I would say that's
ambiguous as to if that's valid, but some people would agree the answer is zero.
> So, would it be possible to allow a zero denominator if the numerator is also zero. I'd
be happy to provide a patch.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message