**Quote from frodus on March 7, 2014**

I’ve compiled a comprehensive list of PID operators and functions from various posts into one thread. If you know of any additional, post below and I will edit this post and try to keep near the top,or if Ian can STICKY, that’d be awesome.

I’ve found these:

***** — multiply, example 256*A

**/** — Divide, example A/10

**+** — Add, example 256*A+B

**–** — Subtract, example B-10

**&** – Logical AND, example A&4

**()** — precedence operator, example (256*A+B)*0.1

**{A:b}** — returns the bth bit of the byte A. Least significant bit is 0, example A = 00001010b = 09h, {A:0} = 0; {A:1} = 1

**[XX]** – returns the value of a PID, where XX is the ID of the OBD2 sensor. i.e. [0d] (speed) or [ff1001] (gps speed)

**Baro()** returns barometer psia from [33] – Vehicle or [ff1270] – Phone.

**A^B** – returns A to the power of b

**Log10(A)** – returns the Log(base 10) of A

**SIGNED(A)** returns decimal value of A assuming highest bit is a sign bit

**ABS(A)** returns absolute value of A

**VAL{sensor name}** returns the value of the sensor, make sure this matches exactly. Sensor names are their untranslated names.

Piemmm,

Do you have a full list of all the math that is available? Even if you email it to me, I can write it up and document it here. I just don’t know if there are any more available.

Also, suggest having a MIN() and MAX() that returns a running minimum or maximum of a particular PID.