On the TI-Nspire calculator, every division answer given, unless irrational, is given in exact form, either as an integer or as a fraction. I can do this in Perl with the fraction module. Every square root answer given is also given in exact form, either as an integer or as a radical. I do not know how to do this in perl. How do you convert a number to a radical?