| 1 | initial version |
That's not a bug, your matrix is simply not invertible. You can see it by switching the ring to SR to perform exact computations:
test_S_SR = matrix(SR, 5)
for ix in range(0, 5):
for iy in range(0, 5):
test_S_SR[ix, iy] = sin(ix+iy)*sin(iy+1)
sage: test_S_SR.determinant().trig_reduce() # can take a few seconds
0
The float version looks invertible but that's only due to machine precision. Since the internal mechanism are probably different for RR and CC, it's normal that you get different answers.
| 2 | No.2 Revision |
That's not a bug, your matrix is simply not invertible. You can see it by switching the ring to SR to perform exact computations:
test_S_SR = matrix(SR, 5)
for ix in range(0, 5):
for iy in range(0, 5):
test_S_SR[ix, iy] = sin(ix+iy)*sin(iy+1)
$$
\left(\begin{array}{rrrrr}
0 & \sin\left(2\right) \sin\left(1\right) & \sin\left(3\right) \sin\left(2\right) & \sin\left(4\right) \sin\left(3\right) & \sin\left(5\right) \sin\left(4\right) \
\sin\left(1\right)^{2} & \sin\left(2\right)^{2} & \sin\left(3\right)^{2} & \sin\left(4\right)^{2} & \sin\left(5\right)^{2} \
\sin\left(2\right) \sin\left(1\right) & \sin\left(3\right) \sin\left(2\right) & \sin\left(4\right) \sin\left(3\right) & \sin\left(5\right) \sin\left(4\right) & \sin\left(6\right) \sin\left(5\right) \
\sin\left(3\right) \sin\left(1\right) & \sin\left(4\right) \sin\left(2\right) & \sin\left(5\right) \sin\left(3\right) & \sin\left(6\right) \sin\left(4\right) & \sin\left(7\right) \sin\left(5\right) \
\sin\left(4\right) \sin\left(1\right) & \sin\left(5\right) \sin\left(2\right) & \sin\left(6\right) \sin\left(3\right) & \sin\left(7\right) \sin\left(4\right) & \sin\left(8\right) \sin\left(5\right)
\end{array}\right)
$$
sage: test_S_SR.determinant().trig_reduce() # can take a few seconds
0
The float version looks invertible but that's only due to machine precision. Since the internal mechanism are probably different for RR and CC, it's normal that you get different answers.
| 3 | No.3 Revision |
That's not a bug, your matrix is simply not invertible. You can see it by switching the ring to SR to perform exact computations:
test_S_SR = matrix(SR, 5)
for ix in range(0, 5):
for iy in range(0, 5):
test_S_SR[ix, iy] = sin(ix+iy)*sin(iy+1)
sage: test_S_SR
$$
The float version looks invertible but that's only due to machine precision. Since the internal mechanism are probably different for RR and CC, it's normal that you get different answers.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.