ApasScript.

Algebraic Numbers

algebraic

The exact real root of a square-free polynomial (degree 3 or more) that lies in the open rational interval (lo, hi) -- checked to be the only root there.

sign

Of an algebraic number: negative, zero or positive. Of an ordinary number, the signum function: -1, 0 or 1.

refine

The same root with its isolating interval halved.

sameRoot

True if two algebraic numbers are the same real number.

compare

less, equal or greater: a against another algebraic number or a rational (refine first if the intervals overlap).

affine

scale * a + offset, exact.

square

a^2, exact.