| 1 | initial version |
It comes from machine precision. sqrt(2)*sqrt(1/2) is slightly bigger than one. In fact sqrt(2)*sqrt(1/2)-1 returns 2.22044604925031e-16 on my computer, instead of zero. To avoid the issue, you can simply replace '.n()by.simplify().n()`.
| 2 | No.2 Revision |
It comes from machine precision. sqrt(2)*sqrt(1/2) is slightly bigger than one. In fact sqrt(2)*sqrt(1/2)-1 returns 2.22044604925031e-16 on my computer, instead of zero. To avoid the issue, you can simply replace '.n()by.n().simplify().n()`. by .simplify().n().
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.