[Numpy-discussion] Bugs using complex192

Matts Bjoerck Matts.Bjorck@gmail....
Mon Jan 7 04:04:43 CST 2008


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.00000000e+00+0.j,   1.00000000e+00+0.j,   1.22460635e-16-0.j,
        -1.00000000e+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.0000074e-5119j, 1.5934769e-4932+0e-5119j],
dtype=complex192)

In [24]: cos(x128)
Out[24]: 
array([  1.00000000e+00-0.j,   6.12303177e-17-0.j,  -1.00000000e+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])







More information about the Numpy-discussion mailing list