Ask Your Question

Revision history [back]

click to hide/show revision 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

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

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

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