[jira] [Updated] (MATH-1397) Complex.ZERO.pow(2.0) is NaN
[ https://issues.apache.org/jira/browse/MATH-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated MATH-1397: - Labels: pull-request-available (was: ) > Complex.ZERO.pow(2.0) is NaN > > > Key: MATH-1397 > URL: https://issues.apache.org/jira/browse/MATH-1397 > Project: Commons Math > Issue Type: Bug >Affects Versions: 3.6.1 > Environment: Linux, Java1.7/Java1.8 >Reporter: Mario Wenzel >Assignee: Eric Barnhill >Priority: Minor > Labels: pull-request-available > Fix For: 4.0 > > > ``` > package complextest; > import org.apache.commons.math3.complex.Complex; > public class T { > public static void main(String[] args) { > System.out.println(Complex.ZERO.pow(2.0)); > } > } > ``` > This is the code and the readout is `(NaN, NaN)`. This surely isn't right. > For one, it should actually be zero > (https://www.wolframalpha.com/input/?i=(0%2B0i)%5E2) and second of all, the > documentation doesn't state that anything could go wrong from a Complex > number that has no NaNs and Infs. > The other definition states that it doesn't work when the base is Zero, but > it surely should. This strange corner case destroys any naive implementation > of stuff wrt the mandelbrot set. > It would be nice to not have to implement this exception myself. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (MATH-1397) Complex.ZERO.pow(2.0) is NaN
[ https://issues.apache.org/jira/browse/MATH-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rob Tompkins updated MATH-1397: --- Fix Version/s: 4.0 > Complex.ZERO.pow(2.0) is NaN > > > Key: MATH-1397 > URL: https://issues.apache.org/jira/browse/MATH-1397 > Project: Commons Math > Issue Type: Bug >Affects Versions: 3.6.1 > Environment: Linux, Java1.7/Java1.8 >Reporter: Mario Wenzel >Assignee: Eric Barnhill >Priority: Minor > Fix For: 4.0 > > > ``` > package complextest; > import org.apache.commons.math3.complex.Complex; > public class T { > public static void main(String[] args) { > System.out.println(Complex.ZERO.pow(2.0)); > } > } > ``` > This is the code and the readout is `(NaN, NaN)`. This surely isn't right. > For one, it should actually be zero > (https://www.wolframalpha.com/input/?i=(0%2B0i)%5E2) and second of all, the > documentation doesn't state that anything could go wrong from a Complex > number that has no NaNs and Infs. > The other definition states that it doesn't work when the base is Zero, but > it surely should. This strange corner case destroys any naive implementation > of stuff wrt the mandelbrot set. > It would be nice to not have to implement this exception myself. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (MATH-1397) Complex.ZERO.pow(2.0) is NaN
[ https://issues.apache.org/jira/browse/MATH-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gilles updated MATH-1397: - Assignee: Eric Barnhill > Complex.ZERO.pow(2.0) is NaN > > > Key: MATH-1397 > URL: https://issues.apache.org/jira/browse/MATH-1397 > Project: Commons Math > Issue Type: Bug >Affects Versions: 3.6.1 > Environment: Linux, Java1.7/Java1.8 >Reporter: Mario Wenzel >Assignee: Eric Barnhill >Priority: Minor > > ``` > package complextest; > import org.apache.commons.math3.complex.Complex; > public class T { > public static void main(String[] args) { > System.out.println(Complex.ZERO.pow(2.0)); > } > } > ``` > This is the code and the readout is `(NaN, NaN)`. This surely isn't right. > For one, it should actually be zero > (https://www.wolframalpha.com/input/?i=(0%2B0i)%5E2) and second of all, the > documentation doesn't state that anything could go wrong from a Complex > number that has no NaNs and Infs. > The other definition states that it doesn't work when the base is Zero, but > it surely should. This strange corner case destroys any naive implementation > of stuff wrt the mandelbrot set. > It would be nice to not have to implement this exception myself. -- This message was sent by Atlassian JIRA (v6.3.4#6332)