Representing irrationals in exact form

How can I make irrationals evaluated in the calculator show the exact form? For example, if I have \sqrt(18), how can I make it display 3\sqrt(2) (the exact form) instead of 4.24264069. I want to evaluate it in the exact form, but I don’t see a setting to do so (like there is for irrational).
Edit: Wait how do I insert math formulas? Sorry, first-time poster :blush:

The calculator can’t automatically reduce radicals for you. You’d have to make a function of some sort to do so.

Ah, okay. I saw that you could on Google, but I couldn’t find the stuff they said they used. Well, it’s time to write my own JS program to do so! I was just wondering because I thought it would be useful in my education right now (I’m in Precal).