[Bug libstdc++/90638] Wrong results of pow(complex , T1) function when the T1 type differs from T and from int

2019-06-07 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90638 --- Comment #10 from Jonathan Wakely --- As a workaround for C++03, you can either change the type of lp1 and lp2 to double, or cast them when used: std::cout<<' '<&, int) overload being used.

[Bug libstdc++/90638] Wrong results of pow(complex , T1) function when the T1 type differs from T and from int

2019-06-07 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90638 Jonathan Wakely changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug libstdc++/90638] Wrong results of pow(complex , T1) function when the T1 type differs from T and from int

2019-05-27 Thread Igor.Smirnov at cern dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90638 --- Comment #8 from Igor Smirnov --- Let me add corrections to my previous post. 1. It needs to add (long double) before M_PI / LONG_MAX in the line long double phid = M_PI / LONG_MAX; in the above example. But the result is not changed

[Bug libstdc++/90638] Wrong results of pow(complex , T1) function when the T1 type differs from T and from int

2019-05-27 Thread Igor.Smirnov at cern dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90638 --- Comment #7 from Igor Smirnov --- There can be still problems with big integer powers of complex numbers in the latest versions. I just don't see a single correct answer. As above the expected correct responses are marked by "should be" and

[Bug libstdc++/90638] Wrong results of pow(complex , T1) function when the T1 type differs from T and from int

2019-05-27 Thread Igor.Smirnov at cern dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90638 --- Comment #6 from Igor Smirnov --- Mark, thank you for useful advice. So, my conclusion is that the rules for resolution in the presence of function templates are not changed in gcc. For all versions of C++ the result generated by this site

[Bug libstdc++/90638] Wrong results of pow(complex , T1) function when the T1 type differs from T and from int

2019-05-27 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90638 --- Comment #5 from Marc Glisse --- Igor, there are free websites that let you check it for yourself very easily, for instance https://wandbox.org/ , you can test many versions of the compiler online there.

[Bug libstdc++/90638] Wrong results of pow(complex , T1) function when the T1 type differs from T and from int

2019-05-27 Thread Igor.Smirnov at cern dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90638 --- Comment #4 from Igor Smirnov --- Richard, thanks for checks. Yes this is correct result. I am wondering, do they correct this problem for complex<> and for inbuilt types only? Is there a possibility for you to run the following program on

[Bug libstdc++/90638] Wrong results of pow(complex , T1) function when the T1 type differs from T and from int

2019-05-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90638 --- Comment #3 from Richard Biener --- GCC 7, 8 and 9 for me output (1,1.46292e-09) 2147483647 2147483648 (-1,7.77156e-16) (-1,-1.46292e-09) (1.55377,0.643594) (1.55377,0.643594) (1.55377,0.643594) (1.55377,0.643594) (1.55377,0.643594)

[Bug libstdc++/90638] Wrong results of pow(complex , T1) function when the T1 type differs from T and from int

2019-05-26 Thread Igor.Smirnov at cern dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90638 --- Comment #2 from Igor Smirnov --- Strange... It came with freshiest available CentOS 7.6.

[Bug libstdc++/90638] Wrong results of pow(complex , T1) function when the T1 type differs from T and from int

2019-05-26 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90638 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|