### About

Date: 2014-07-10### Summary

The notation f(x-y) is ambiguous, it is not clear whether it is a function evaluation or multiplication. A few ways to distinguish are presented but no option is perfect.### Contents

# Ambiguous Function Notation¶

## The Problem¶

Say you see this:

Does this mean that the function is *evaluated* at ? Or does that mean
that some *times* ?

The problem is, that mathematical texts, including physical texts, are not to be interpreted by a computer. I would like this to be very clear cut and unambiguous, so I thought about a solution to this, inspired by other things I saw.

## Solutions¶

### C and other Programming Languages¶

The evaluation in C is writen like so:

```
f(x-y)
```

Whereas the multiplication is denoted like so:

```
f*(x-y)
```

This is fine, but has one problem. If you want to denote , you would have to write every single multiplication sign:

```
omega * R * C
```

This is unacceptable for normal formulas, since it has way to many “” in it.

### Mathematica¶

Mathematica has its very own solution to this. It denotes function calls with
`[]`

and multiplication with `()`

. That way, it is clear what is meant.

Function call:

```
f[x-y]
```

Multiplication:

```
f(x-y)
```

It works great for a mathematical programming language, but it is extremely unusual to write it this way. I tried it once, in problem set physik421-10, which you can find at physik421 Theoretische Physik 3.

## My Ideas¶

### The dot¶

To use the unambiguous way the C language does it, without too many “” in it, I now write a “” in front of every “” if I mean a multiplication. So the examples from “The Problem” become:

### Brackets and parentheses¶

The way it is used in Mathematica is consistent with itself, but very strange for other people.

So I currently use this inverted:

This still has the problem that it is not obvious if you do not know the convention. Also, functional dependencies are sometimes denoted with square brackets. When I switch between Mathematica and this notation, the confusion is maximized. So far, this is the best compromise, I think.