[
https://issues.apache.org/jira/browse/MATH-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494424
]
Richard Lyon commented on MATH-164:
-----------------------------------
I don't believe full compliance with C99 is required or desirable. For instance
the classification of whether a complex is a NaN or Infinite. If a complex
number has a component which is a NaN, why would you want to classify the
complex as anything but NaN? Isn't this going to effect just about every
function which takes a complex operand?
However to maintain some consistency with the way java handles doubles it is
necessary to comply with many parts of C99. A typical example is the case I
have reported.
I have only been testing using the sun jdk and jre. What about other
implementations?
> Complex - Issue with non-compliance to C99!
> -------------------------------------------
>
> Key: MATH-164
> URL: https://issues.apache.org/jira/browse/MATH-164
> Project: Commons Math
> Issue Type: Wish
> Affects Versions: 1.1
> Reporter: Richard Lyon
> Priority: Minor
>
> Complex z1, z2, z3;
>
> // assign values to the two complex numbers
> z1 = new Complex(1.0, 0.0);
> z2 = new Complex(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);
>
> // multiply the two complex numbers
> z3 = z1.multiply(z2);
> The result is that both the real and imaginary part of z3 are NaN. Isn't it
> somewhat desirable that both parts of the complex should be Infinity?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]