Formula from random values


I’m new to writing CL, but I had this function that needs to essentially do this:
bcd - ((d-2a)0.5(d-2a)0.53.142*.5*b)

Each of those variables is assigned a random value from a previous screen. I wrote it like this, but it’s not getting the correct value. Is there anything wrong with the syntax? I know there is probably a better way to write it, but this is all I can figure out. Thanks!


First, it’ll be easier to simplify to (I assume 3.142 is pi):
b *c* d - (0.125*\\pi*b(d-2a)^2)

Any variable called needs to be surrounded by ${ } . It also might make things easier (at least to read/type the code) to create a variable for each first, then create the function. (The “f(x)=” is unnecessary as well.)


Thanks. That sounds like an easier way to set it up. I’ll give it a try!

And actually since there isn’t a variable x, you could use numericValue instead of simpleFunction if you just want the output value. Otherwise, you have to use evaluateAt as well.

And you could avoid the first four variables by doing the calculation within input34 and just calling the variable for the calculation wherever you need it.