Is there a better to do square root then Math.sqrt()
? Instead of Math.pow()
you can do **
, is there any simpler way to do square root? This is for my algebra calculator (https://repl.it/@John_Nicole/Graph), and i would want a more user friendly way then to type Math.sqrt()
.
There’s no simpler way to implement it, but you can invent any syntax you want — just translate it later. Eg. have a √ button and imply some parentheses. Or let the user enter **(1/2).