Macro Library radicals
A collection of functions for working with radicals
Version 3 Nov 27 2017
reduceradical(inside,[root,format])
given the inside of a radical, reduces it to Aroot(B)
inside: inside of the radical.
root: root of radical. Default is 2 (sqrt)
format: default is "string", which returns "4sqrt(5)"
"disp", returns the string wrapped in backticks for display
"parts", returns an array of the parts: array(4,5)
reduceradicalfrac(wholenum,rootnum,denom,[root,format])
given (wholenum*root(rootnum))/denom, reduces the root then the fraction
root: root of radical. Default is 2 (sqrt)
format: default is "string", which returns "4sqrt(5)/2"
"disp", returns the string wrapped in backticks for display
"parts", returns an array of the parts: array(4,5,2)
reduceradicalfrac2(num,wholedenom,rootnum,[rationalize,root,format])
given num/(wholedenom*root(rootnum)), reduces the root then the fraction
rationalize: rationalize the denominator. Default is false.
root: root of radical. Default is 2 (sqrt)
format: default is "string", which returns "2/(3sqrt(5))"
"disp", returns the string wrapped in backticks for display
"parts", returns an array of the parts: array(2,3,5)
reducequadraticform(a,b,c,d,[format])
given (a+bsqrt(c))/d, reduces the root then the fraction
format: default is "string", which returns "(1+4sqrt(5))/2"
"disp", returns the string wrapped in backticks for display
"parts", returns an array of the parts: array(1,4,5,2)