Skip to content

QuadraticIrrationalQ

QuadraticIrrationalQ(expr)

returns True, if the expr is of the form (p + s * Sqrt(d)) / q for integers p,q,d,s.

See

Examples

>> QuadraticIrrationalQ(5*Sqrt(11))
True
>> QuadraticIrrationalQ((7*Sqrt(2) + 1)/11)
True
>> QuadraticIrrationalQ(42)
False

ContinuedFraction

Implementation status

  • ✅ - full supported

Github