• Troy@lemmy.caOP
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    1 year ago

    I agree. Mathematical notation is often terribly opaque. And sometimes outright broken. Why the hell is it sin²(x)? Any reasonable programmer will tell you that this syntax will only lead to trouble. ;)

      • Kogasa@programming.dev
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 year ago

        Putting an exponent on a function symbol like that usually means either a typical exponential/power, except when it’s -1, in which case it’s a functional inverse. sin^(-1)(x) is the functional inverse of sin(x), which is not the same as the reciprocal (sin(x))^(-1). Some people even use sin^(a)(x) where a is an integer to denote functional composition, so sin^(2)(x) = sin(sin(x)).

        Besides that pretty major issue, nothing.