Arithmetic Operators

<Table align={["left", "left", "left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Operator
      </th>
      <th style={{ textAlign: "left" }}>
        Description
      </th>
      <th style={{ textAlign: "left" }}>
        Example
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        $trunc
      </td>
      <td style={{ textAlign: "left" }}>
        Truncates a number down to an integer.
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$trunc": "c_value"}` 
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $sqrt
      </td>
      <td style={{ textAlign: "left" }}>
        Takes the square root of an aggregated number.
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$sqrt": {"$add": "c_value"}}`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $ln
      </td>
      <td style={{ textAlign: "left" }}>
        Takes the log of a number.
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$ln": "c_number"}`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $floor
      </td>
      <td style={{ textAlign: "left" }}>
        Returns the largest integer less than or equal to the number
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$floor": "c_number"}`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $exp
      </td>
      <td style={{ textAlign: "left" }}>
        Takes the e^n of a number
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$exp": "c_number"}`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $ceil
      </td>
      <td style={{ textAlign: "left" }}>
        Returns the smallest integer greater than or equal to the specified number.
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$ceil": "c_number"}`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $abs
      </td>
      <td style={{ textAlign: "left" }}>
        Takes the absolute value of a number.
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$abs": "c_number"}`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $add
      </td>
      <td style={{ textAlign: "left" }}>
        Adds two or more array properties or expressions. In addition to numbers, a single Date value may be included in the array.
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$add": ["created", "c_msOffset"]}`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $multiply
      </td>
      <td style={{ textAlign: "left" }}>
        Multiplies two or more number properties or expressions in the passed in array.
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$multiply": ["c_bpm", "c_scalar", {"$number": 0.99}]}`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $subtract
      </td>
      <td style={{ textAlign: "left" }}>
        Subtracts the second element from the first in the passed in array. In addition to number properties, numbers and dates maybe be subtracted from a date value.
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$subtract": ["created", "updated"]}`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $divide
      </td>
      <td style={{ textAlign: "left" }}>
        Divides the second element by the first in the passed in array.
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$divide": ["c_bpm", {"$number": 0.9}]}`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $mod
      </td>
      <td style={{ textAlign: "left" }}>
        Divides the second element by the first in the passed in array, and returns the remainder.
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$divide": ["c_bpm", {"$number": 20}]}`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $pow
      </td>
      <td style={{ textAlign: "left" }}>
        Raises the first number to the power of the second number.
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$pow": ["c_heartrate", {"$number": 2}]}`
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        $log
      </td>
      <td style={{ textAlign: "left" }}>
        Takes the log of the first number in the second number's base.
      </td>
      <td style={{ textAlign: "left" }}>
        `{"$log": [100, 10]}`
        {/* result: 2 */}
      </td>
    </tr>
  </tbody>
</Table>