[ https://issues.apache.org/jira/browse/NUMBERS119?page=com.atlassian.jira.plugin.system.issuetabpanels:commenttabpanel&focusedCommentId=16875888#comment16875888
]
Heinrich Bohne commented on NUMBERS119:

Excellent, thanks! Regarding NUMBERS123 and 124: I found one missed Javadoc update, for which
I'll create a pull request. Or is a patch preferable for such trivial changes? I'll create
a patch too, if I manage to upload it in NUMBERS123.
> BigFraction(double) constructor does not treat subnormal numbers correctly
> 
>
> Key: NUMBERS119
> URL: https://issues.apache.org/jira/browse/NUMBERS119
> Project: Commons Numbers
> Issue Type: Bug
> Components: fraction
> Affects Versions: 1.0
> Reporter: Heinrich Bohne
> Priority: Minor
> Fix For: 1.0
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> The constructor {{BigFraction(double)}} does not take into account the fact that, when
the biased exponent of a {{double}} value is {{0}} and the mantissa is not {{0}} (i.e. when
the value represents a subnormal number), the actual exponent in effect is not {{1023}} but
{{1022}} (or, in other words, the effective exponent bias is not {{1023}} but {{1022}}).
> The value of the created {{BigFraction}} is therefore not equal to the value of the passed
{{double}} argument.
> Also, since the constructor does not handle the case of zero separately, it creates a
fraction with a numerator of 0 and a denominator of 2^1075^, which is not very memoryefficient.

This message was sent by Atlassian JIRA
(v7.6.3#76005)
