Is there a way to include `⅔` in function name?

You could look through the table of unicode input for alternatives. For example, \invv\2/3 which yields ʌ⅔.

Another idea would be something like this:

using SymPy: Sym, @vars

struct TwoThirds end
const _⅔ = TwoThirds()
Base.:(^)(x::Number, ::TwoThirds) = x^(2 / 3)
Base.:(^)(x::Sym, ::TwoThirds) = x^(2 // 3)

Now:

julia> a, b = @vars a b;

julia> 3.4 ^ _⅔
 2.261097438656042

julia> a * b ^ _⅔
    2/3
a⋅b

You could also define other methods for TwoThirds() like + or *.

5 Likes