# canonical form for algebraic numbers

I'm writing a program that converts a text input involving addition, subtraction, multiplication, division, and exponentiation of integers and $i$ into a simplest form, but I've come to realize that I don't know what that should be in some cases.

In particular, what is usually done with surds that have complex numbers inside? I was thinking that it would be desirable to get the whole expression into $a + bi$ form, where $a$ and $b$ are real, but if I'm not mistaken that would require using Euler's formula and polar form in some cases, which in general introduce transcendental functions.

Is there a standard "simplest"/canonical form that sticks exclusively to algebraic representations?

Computing with algebraic numbers in general is possible but quite difficult to implement. Representing the algebraic numbers is part of the problem and is typically done by root isolation: a number $z$ is represented by a polynomial $f$ that has $z$ as a root together with a description of an open set $U$ say (e.g., a circle or a rectangle) such that $z$ is the unique root of $f$ in $U$. Here's a link to one paper on this (found by googling for "computing with algebraic numbers" that compares this approach with another based on approximating sequences.
As far as I know, there is no much better way to handle algebraic numbers in general. In particular, I don't believe any of the known methods give a canonical form (instead they give an algorithm for equality testing). I don't know of any useful general subclass of the algebraic numbers that admits a more straightforward representation. (Obviously you can do much better for very specific number fields such as $\Bbb{Q}[\sqrt{2}]$.)