## RootOf_2

### Definition

Concept to represent algebraic numbers of degree up to 2 over a RealEmbeddable IntegralDomain RT.

A model of this concept is associated to this RT via CGAL::Root_of_traits<RT>, which provides Root_of_2 as a public type. Moreover, CGAL::Root_of_traits<RT> provides the public type Root_of_1, which is the quotient field of RT. We refer to Root_of_1 as FT (for field type).

The model of RootOf_2 is a RealEmbeddable IntegralDomain, which is ImplicitInteroperable with RT, FT. In particular, it provides the comparison operators ==, !=, <, >, <=, >= as well as the sign and compare functions needed to compare elements of types RootOf_2, RT and FT. It also provides all arithmetic operators +,-,*,/ among elements of type RootOf_2 as well as mixed forms with RT and FT.

However, it is important to note that arithmetic operations among elements of RootOf_2 are only allowed in the special case when they have been constructed from equations having the same discriminant, that is, if they are defined in the same algebraic extension of degree 2.

Besides construction from int, RT and FT the following functions provide special construction for extensions of degree 2:
- make_root_of_2
- make_sqrt

### Refines

DefaultConstructible
CopyConstructible
FromIntConstructible
ImplicitInteroperable with RT
ImplicitInteroperable with FT

### Operations

RootOf_2 & \ccPureVar += a
 Precondition: *this and a are defined in the same extension.
RootOf_2 a + b
 Precondition: a and b are defined in the same extension.

bool a == b
bool a < b

Same for operator -,*,/,!=,<=,>,>= as well as mixed forms with RT and FT.

### Has Models

double (not exact)
CGAL::Sqrt_extension