I was trying to build a program that puts a radical into simplest radical form. I, ovbiously, had no luck.
I am looking for a method that takes in a String and returns a String.
An input String: sqrt[160]. I have already made my method take the numerical value out (160).
Now, I just need something to break 160 up and return a String like: "4*sqrt[10]"
Thanks in advance!
NOTE:
- The above is JUST AN EXAMPLE
Factorize the number, all factors with the exponent of power of two can be moved outside the square root. Multiply the rest, that will remain under the root symbol.