I want to draw the graph of the cube root function $f(x) = \sqrt[3]{x+1}$ by using METAPOST. However, when I use the vardef macro as follows
vardef f(expr x) = (x+1)**(1/3) enddef;
It seems to be invalid. How can we define this function in METAPOST?
vardef f(expr x) = (x+1)**(1/3) enddef;
does define a macro corresponding to the functionx\mapsto \sqrt[3]{x+1}
. For instance,f(2)
is1.44225
, which is a good approximation of the cubic root of 3.