Re: [Numpy-discussion] Bugs using complex192
A Monday 07 January 2008, Nils Wagner escrigué: > On Mon, 7 Jan 2008 19:42:40 +0100 > > Francesc Altet <[EMAIL PROTECTED]> wrote: > > A Monday 07 January 2008, Nils Wagner escrigué: > >> >>> numpy.sqrt(numpy.array([-1.0], > >> > >>dtype=numpy.complex192)) > >> > >> Traceback (most recent call last): > >>File "", line 1, in > >> AttributeError: 'module' object has no attribute > >> 'complex192' > >> > >> >>> numpy.__version__ > >> > >> '1.0.5.dev4673' > > > > It seems like you are using a 64-bit platform, and they > >tend to have > > complex256 (quad-precision) types instead of complex192 > > (extended-precision) typical in 32-bit platforms. > > > > Cheers, > > > > -- > > > >>0,0< Francesc Altet http://www.carabos.com/ > > > > V V Cárabos Coop. V. Enjoy Data > > "-" > > ___ > > Numpy-discussion mailing list > > Numpy-discussion@scipy.org > > http://projects.scipy.org/mailman/listinfo/numpy-discussion > > > >>> import numpy > >>> numpy.sqrt(numpy.array([-1.0], dtype=numpy.complex256)) > > Segmentation fault > > Shall I file a bug report ? Yes, I think so. Cheers, -- >0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-" ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Bugs using complex192
On Mon, 7 Jan 2008 19:42:40 +0100 Francesc Altet <[EMAIL PROTECTED]> wrote: > A Monday 07 January 2008, Nils Wagner escrigué: >> >>> numpy.sqrt(numpy.array([-1.0], >>dtype=numpy.complex192)) >> >> Traceback (most recent call last): >>File "", line 1, in >> AttributeError: 'module' object has no attribute >> 'complex192' >> >> >>> numpy.__version__ >> >> '1.0.5.dev4673' > > It seems like you are using a 64-bit platform, and they >tend to have > complex256 (quad-precision) types instead of complex192 > (extended-precision) typical in 32-bit platforms. > > Cheers, > > -- >>0,0< Francesc Altet http://www.carabos.com/ > V V Cárabos Coop. V. Enjoy Data > "-" > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion >>> import numpy >>> numpy.sqrt(numpy.array([-1.0], dtype=numpy.complex256)) Segmentation fault Shall I file a bug report ? Nils ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Bugs using complex192
A Monday 07 January 2008, Nils Wagner escrigué: > >>> numpy.sqrt(numpy.array([-1.0], dtype=numpy.complex192)) > > Traceback (most recent call last): >File "", line 1, in > AttributeError: 'module' object has no attribute > 'complex192' > > >>> numpy.__version__ > > '1.0.5.dev4673' It seems like you are using a 64-bit platform, and they tend to have complex256 (quad-precision) types instead of complex192 (extended-precision) typical in 32-bit platforms. Cheers, -- >0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-" ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Bugs using complex192
On Mon, 7 Jan 2008 10:10:50 +0100 "Matthieu Brucher" <[EMAIL PROTECTED]> wrote: > i, > > I managed to reproduce your bugs on a FC6 box : import numpy as n > n.sqrt(n.array([-1.0],dtype = n.complex192)) > array([0.0+9.2747134e+492j], dtype=complex192) > n.sqrt(n.array([-1.0],dtype = n.complex128)) > array([ 0.+1.j]) > x=n.array([0.0+0.0j, 1.0+0.0j], dtype=n.complex192) x > array([0.0+0.0j, 1.0+0.0j], dtype=complex192) > -x > array([3.3621031e-4932+-1.0204727e+2057j, >1.6794099e-4932+5.5355029e-4930j], > dtype=complex192) > n.__version__ > '1.0.5.dev4494' > > Matthieu > > 2008/1/7, Matts Bjoerck <[EMAIL PROTECTED]>: >> >> Hi, >> >> I've started using complex192 for some calculations and >>came across two >> things >> that seems to be bugs: >> >> In [1]: sqrt(array([-1.0],dtype = complex192)) >> Out[1]: array([0.0+-6.1646549e-4703j], dtype=complex192) >> >> In [2]: sqrt(array([-1.0],dtype = complex128)) >> Out[2]: array([ 0.+1.j]) >> >> In [3]: x >> Out[3]: array([0.0+0.0j, 1.0+0.0j], dtype=complex192) >> >> In [4]: -x >> Out[4]: array([3.3621031e-4932+0.0012454e-5119j, >> 1.6794099e-4932+0.0011717e-5119j], dtype=complex192) >> >> So, sqrt and using a negation does not seem to work. >>Have anyone else came >> across this as well? >> >> using numpy 1.0.3 on ubuntu >> >> Any help appriciated >> >> /Matts >> >> ___ >> Numpy-discussion mailing list >> Numpy-discussion@scipy.org >> http://projects.scipy.org/mailman/listinfo/numpy-discussion >> > > > > -- >French PhD student > Website : http://matthieu-brucher.developpez.com/ > Blogs : http://matt.eifelle.com and >http://blog.developpez.com/?blog=92 > LinkedIn : http://www.linkedin.com/in/matthieubrucher >>> numpy.sqrt(numpy.array([-1.0], dtype=numpy.complex192)) Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'complex192' >>> numpy.__version__ '1.0.5.dev4673' Nils ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Bugs using complex192
Thanks for the fast replies, now I know it's not my machine that gives me trouble. In the meantime I tested a couple of other functions. It seems that all of them fail with complex192. /Matts In [19]: x192 = arange(0,2,0.5,dtype = complex192)*pi In [20]: x128 = arange(0,2,0.5,dtype = complex128)*pi In [21]: sin(x192) Out[21]: array([0.0+0.0j, 1.6794099e-4932+0.0j, 1.5925715e-4932+4.2044193e+3906j, 1.6794099e-4932+2.3484019e-4941j], dtype=complex192) In [22]: sin(x128) Out[22]: array([ 0.e+00+0.j, 1.e+00+0.j, 1.22460635e-16-0.j, -1.e+00-0.j]) In [23]: cos(x192) Out[23]: array([1.6794099e-4932+-2.7540704e+667j, 1.5909299e-4932+0e-5119j, 1.6794099e-4932+0.074e-5119j, 1.5934769e-4932+0e-5119j], dtype=complex192) In [24]: cos(x128) Out[24]: array([ 1.e+00-0.j, 6.12303177e-17-0.j, -1.e+00-0.j, -1.83690953e-16+0.j]) In [25]: exp(x192) Out[25]: array([1.6794099e-4932+0.0j, 1.6830259e-4932+1.5656013e-4940j, 1.6867092e-4932+1.741791e-2343j, 1.6904736e-4932+0e-5119j], dtype=complex192) In [26]: exp(x128) Out[26]: array([ 1.+0.j,4.81047738+0.j, 23.14069263+0.j, 111.31777849+0.j]) In [27]: log10(x192) Warning: divide by zero encountered in log10 Out[27]: array([3.3604615e-4932+0.0j, 1.675419e-4932+1.5656013e-4940j, 1.6777496e-4932+7.1009005e-2357j, 1.6783371e-4932+0.0017686e-5119j], dtype=complex192) In [28]: log10(x128) Warning: divide by zero encountered in log10 Out[28]: array([ -inf+0.j, 1.96119877e-001+0.j, 4.97149873e-001+0.j, 6.73241132e-001+0.j]) In [29]: log(x192) Warning: divide by zero encountered in log Out[29]: array([3.3604615e-4932+-2.7540703e+667j, 1.6774503e-4932+0.0007074e-5119j, 1.6796475e-4932+7.0728523e-2357j, 1.6803131e-4932+1.5656013e-4940j], dtype=complex192) In [30]: log(x128) Warning: divide by zero encountered in log Out[30]: array([ -inf+0.j, 4.51582705e-001+0.j, 1.14472989e+000+0.j, 1.55019499e+000+0.j]) ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Bugs using complex192
It doesn't work on Windows, either. In [35]: numpy.sqrt(numpy.array([-1.0], dtype=numpy.complex192)) Out[35]: array([0.0+2.9996087e-305j], dtype=complex192) In [36]: numpy.sqrt(numpy.array([-1.0], dtype=numpy.complex128)) Out[36]: array([ 0.+1.j]) In [37]: numpy.__version__ Out[37]: '1.0.5.dev4567' hth, L. On 1/7/08, Matthieu Brucher <[EMAIL PROTECTED]> wrote: > > i, > > I managed to reproduce your bugs on a FC6 box : > >>> import numpy as n > > >>> n.sqrt(n.array([-1.0],dtype = n.complex192)) > array([0.0+9.2747134e+492j], dtype=complex192) > > >>> n.sqrt(n.array([-1.0],dtype = n.complex128)) > array([ 0.+1.j]) > > >>> x=n.array([0.0+0.0j, 1.0+0.0j], dtype=n.complex192) > >>> x > array([0.0+0.0j, 1.0+0.0j], dtype=complex192) > > >>> -x > array([3.3621031e-4932+-1.0204727e+2057j, 1.6794099e-4932+5.5355029e-4930j], > dtype=complex192) > > >>> n.__version__ > '1.0.5.dev4494' > > Matthieu > > 2008/1/7, Matts Bjoerck < [EMAIL PROTECTED]>: > > > > Hi, > > > > I've started using complex192 for some calculations and came across two > > things > > that seems to be bugs: > > > > In [1]: sqrt(array([-1.0],dtype = complex192)) > > Out[1]: array([0.0+-6.1646549e-4703j], dtype=complex192) > > > > In [2]: sqrt(array([-1.0],dtype = complex128)) > > Out[2]: array([ 0.+1.j]) > > > > In [3]: x > > Out[3]: array([0.0+0.0j, 1.0+0.0j], dtype=complex192) > > > > In [4]: -x > > Out[4]: array([3.3621031e-4932+0.0012454e-5119j, > > 1.6794099e-4932+0.0011717e-5119j], dtype=complex192) > > > > So, sqrt and using a negation does not seem to work. Have anyone else > > came > > across this as well? > > > > using numpy 1.0.3 on ubuntu > > > > Any help appriciated > > > > /Matts > > > > ___ > > Numpy-discussion mailing list > > Numpy-discussion@scipy.org > > http://projects.scipy.org/mailman/listinfo/numpy-discussion > > > > > > -- > French PhD student > Website : http://matthieu-brucher.developpez.com/ > Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 > LinkedIn : http://www.linkedin.com/in/matthieubrucher > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > > ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Bugs using complex192
i, I managed to reproduce your bugs on a FC6 box : >>> import numpy as n >>> n.sqrt(n.array([-1.0],dtype = n.complex192)) array([0.0+9.2747134e+492j], dtype=complex192) >>> n.sqrt(n.array([-1.0],dtype = n.complex128)) array([ 0.+1.j]) >>> x=n.array([0.0+0.0j, 1.0+0.0j], dtype=n.complex192) >>> x array([0.0+0.0j, 1.0+0.0j], dtype=complex192) >>> -x array([3.3621031e-4932+-1.0204727e+2057j, 1.6794099e-4932+5.5355029e-4930j], dtype=complex192) >>> n.__version__ '1.0.5.dev4494' Matthieu 2008/1/7, Matts Bjoerck <[EMAIL PROTECTED]>: > > Hi, > > I've started using complex192 for some calculations and came across two > things > that seems to be bugs: > > In [1]: sqrt(array([-1.0],dtype = complex192)) > Out[1]: array([0.0+-6.1646549e-4703j], dtype=complex192) > > In [2]: sqrt(array([-1.0],dtype = complex128)) > Out[2]: array([ 0.+1.j]) > > In [3]: x > Out[3]: array([0.0+0.0j, 1.0+0.0j], dtype=complex192) > > In [4]: -x > Out[4]: array([3.3621031e-4932+0.0012454e-5119j, > 1.6794099e-4932+0.0011717e-5119j], dtype=complex192) > > So, sqrt and using a negation does not seem to work. Have anyone else came > across this as well? > > using numpy 1.0.3 on ubuntu > > Any help appriciated > > /Matts > > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] Bugs using complex192
Hi, I've started using complex192 for some calculations and came across two things that seems to be bugs: In [1]: sqrt(array([-1.0],dtype = complex192)) Out[1]: array([0.0+-6.1646549e-4703j], dtype=complex192) In [2]: sqrt(array([-1.0],dtype = complex128)) Out[2]: array([ 0.+1.j]) In [3]: x Out[3]: array([0.0+0.0j, 1.0+0.0j], dtype=complex192) In [4]: -x Out[4]: array([3.3621031e-4932+0.0012454e-5119j, 1.6794099e-4932+0.0011717e-5119j], dtype=complex192) So, sqrt and using a negation does not seem to work. Have anyone else came across this as well? using numpy 1.0.3 on ubuntu Any help appriciated /Matts ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion