I’m still trying to figure out the things aloud, etc in simpleFunction. (Like when do I need “\” or just “” or can I paste in formulas right from the calculator latex)
I have a function that I’d love to return a 1 or 0, are conditionals aloud within a function?
I’ve tried this and it returns NaN:
correct = simpleFunction("\\abs(a-b)<=0.001:1,0","a","b")
If not, is there a way to make a function that checks a function? Or would I just need to manually write lines for each case I’m checking? Like is there a more efficient way than doing this?
correct1 = when simpleFunction("\\abs(a-b)","a","b").evaluateAt(number1,number2)<=0.001 1 otherwise 0