The valid functions are: e^ (alias: exp) 10^ sqrt (alias: square root, √) ln log abs floor ceil sin cos tan asin (alias: arcsin, sin^-1) acos (alias: arccos, cos^-1) atan (alias: arctan, tan^-1) If there's an error, you have to press the gf again.
This AT forum thread: https://scratch.mit.edu/discuss/post/1957200/ is finding workarounds for as many features in Scratch as possible. This is my contribution: Getting rid of the of block in the operators category. The 2 main mathematical ideas used in this are Taylor Series (technically, I only actually use Maclaurin series, a specific type of Taylor series), which I learnt about this year in my Further Maths A level, and the Newton-Raphson method, which I learnt last year. Every mathematical function (that's infinitely differentable) has a Taylor series, which is an infinite series in which converges to the function itself under certain conditions. The ones I used in this project have no convergence conditions, so they converge for ALL inputs. The Taylor series for e^x = 1 + x + x^2/2! + x^3/3! + ... + x^n/n!, where n! = n factorial = n * (n-1) * (n-2) * ... * 1. The Taylor series for sin and cos are also simple, and I've listed them on the forum post if you're interested. Note that they only work when the input is measured in radians, a different way of measuring angles than degrees, where 1rad = pi/180 deg. So I have conversion functions, and the demo supports both. The taylor series for ln has convergence conditions, but fortunately it can be written in terms of another function, arctanh, which has a simple taylor series which aways converges. (I originally did ln by the Newton Raphson method, but it flucuated too wildly for large inputs, took ages to converge (it still does, unfortunately, but it's better than it used to be) and sometimes even overflowed to infinity or underflowed to 0 during an intermediate calculation. Now there shouldn't be any overflow/underflow weidness, but it's still slow for too large an input, for example 10000. UPDATE: I have now made the ln function significantly faster, by exploiting the fact that ln(m*10^x) = ln(m) + x*ln(10). This is likely how most programming languages (including Scratch itself with the block I'm avoiding) handles logs, except with 2 instead of 10 as computers work in binary. This works by dividing the input by 10 repeatedly until it's small enough for ln to efficiently handle (called the mantissa), and incrementing the exponent each time. The other main idea is the Newton Raphson method. This is where if I have a function f(x) and I want to find the x where f(x) = 0, I start with an initial guess x0, and the function is differentable, a sequence defined by x(n+1) = xn - f(xn) / f'(xn). For example, to find sqrt y, I want to find an x where x^2 - y = 0, so f(x) = x^2 - y, so f'(x) = 2x, so x(n+1) = xn - (xn^2 - y) / 2xn = (xn+y/xn)/2. Some functions require the initial guess to be "good enough", but sqrt does not so my initial guess is just 1 to make it easier. In fact, this is how your computer or calculator (probably) actually calculates square roots! For the other functions though, I doubt that it does because there ar more efficient (but more complicated) ways of doing it, but I use them anyway because they're simple. The other functions: tan, 10^, and log, can be easily done in terms of the others - tan = sin/cos, 10^x = e^(x*ln10), (where I took ln(10) off of Wolfram Alpha), and log x = ln x / ln10.