Ask Your Question

Revision history [back]

click to hide/show revision 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()`.

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().