QuadraticIrrationalQ

QuadraticIrrationalQ[x]

gives True if x is a quadratic irrational and False otherwise.

Details

  • QuadraticIrrationalQ[x] tests whether x can be expressed in the form , where , and are integers.
  • Quadratic irrationals have continued fractions that are ultimately periodic.

Examples

open allclose all

Basic Examples  (1)

Scope  (4)

Rational numbers are not quadratic irrationals:

is a transcendental number:

QuadraticIrrationalQ threads element-wise over lists:

QuadraticIrrationalQ returns False if not given an explicit quadratic irrational:

Introduced in 2007
 (6.0)