![]() | 1 | initial version |
It's a known issue that .is_real()
can produce wrong result for symbolic expression.
When the expression represent an algebraic number, a workaround is to convert it to QQbar
and compare its imaginary part to zero - in your example:
QQbar(inflection_points[2].rhs()).imag() == 0
![]() | 2 | No.2 Revision |
It's a known issue that .is_real()
can produce wrong result for symbolic expression.
When the expression represent represents an algebraic number, a workaround is to convert it to QQbar
and compare its imaginary part to zero - in your example:
QQbar(inflection_points[2].rhs()).imag() == 0
![]() | 3 | No.3 Revision |
It's a known issue that .is_real()
can produce wrong result for symbolic expression.
When the expression represents an algebraic number, a workaround is to convert it to QQbar
and compare its imaginary part to zero - in your example:
QQbar(inflection_points[2].rhs()).imag() == 0
Alternatively, you can test if its belongs to AA
inflection_points[2].rhs() in AA
![]() | 4 | No.4 Revision |
It's a known issue that .is_real()
can produce wrong result for symbolic expression.
When the expression represents an algebraic number, a workaround is to convert it to QQbar
and compare its imaginary part to zero - in your example:
QQbar(inflection_points[2].rhs()).imag() == 0
Alternatively, you can test if its it belongs to AA
:
inflection_points[2].rhs() in AA