> ## Documentation Index
> Fetch the complete documentation index at: https://takeprofit.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Package math

export const Anchor = ({id}) => {
  return <div id={id} style={{
    scrollMarginTop: "var(--scroll-mt)"
  }}></div>;
};

export const Field = ({id, name, type, required, defaultVal, children}) => {
  return <div id={id} style={{
    scrollMarginTop: "var(--scroll-mt)"
  }} className="mt-4">
      <div className="pt-2.5 pb-5 my-2.5 border-gray-50 dark:border-gray-800/50 border-b">
        <div className="flex font-mono text-sm group/param-head param-head">
          <div className="flex-1 flex content-start py-0.5 mr-5">
            <div className="flex items-center flex-wrap gap-2">
              {id && <div className="absolute">
                  <a href={`#${id}`} className="-ml-10 flex items-center opacity-0 border-0 group-hover/param-head:opacity-100 py-2" aria-label={`Navigate to ${id}`}>
                    <div className="w-6 h-6 text-gray-400 rounded-md flex items-center justify-center zinc-box bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20">
                      <svg xmlns="http://www.w3.org/2000/svg" fill="gray" height="12px" viewBox="0 0 576 512">
                        <path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"></path>
                      </svg>
                    </div>
                  </a>
                </div>}
              <div className="font-semibold text-primary dark:text-primary-light">
                {name}
              </div>
              <div className="flex items-center space-x-2 text-xs font-medium">
                <div className="flex items-center px-2 py-0.5 rounded-md bg-gray-100/50 dark:bg-white/5 text-gray-600 dark:text-gray-200 font-medium">
                  {type}
                </div>
                {required && <span className="px-2 py-0.5 rounded-md bg-red-100/50 dark:bg-red-400/10 text-red-600 dark:text-red-300 font-medium">
                    required
                  </span>}
                {defaultVal && <div className="flex items-center px-2 py-0.5 rounded-md bg-gray-100/50 dark:bg-white/5 text-gray-600 dark:text-gray-200 font-medium">
                    <span class="text-gray-400 dark:text-gray-500">default:</span>
                    {defaultVal}
                  </div>}
              </div>
            </div>
          </div>
        </div>
        <div className="mt-4 prose-sm prose-gray dark:prose-invert">
          {children}
        </div>
      </div>
    </div>;
};

Math package.

<Note>See description in the [official Python docs](https://docs.python.org/3.10/library/math.html).</Note>

***

## Variables

<Steps>
  <Step title="Constants" icon="pi">
    <Field id="const_e" name="e" type="float">
      Standard constant of Indie math package (similar to Python's).
    </Field>

    <Field id="const_inf" name="inf" type="float">
      Standard constant of Indie math package (similar to Python's).
    </Field>

    <Field id="const_nan" name="nan" type="float">
      Standard constant of Indie math package (similar to Python's).
    </Field>

    <Field id="const_pi" name="pi" type="float">
      Standard constant of Indie math package (similar to Python's).
    </Field>
  </Step>
</Steps>

***

## Functions

<Anchor id="func_acos" />

### `acos()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="acos" type="(x) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_asin" />

### `asin()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="asin" type="(x) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_atan" />

### `atan()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="atan" type="(x) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_ceil" />

### `ceil()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="ceil" type="(x) -> int">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_cos" />

### `cos()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="cos" type="(x) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_exp" />

### `exp()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="exp" type="(x) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_exp2" />

### `exp2()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="exp2" type="(x) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_floor" />

### `floor()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="floor" type="(x) -> int">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_isclose" />

### `isclose()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="isclose" type="(x, y, *, rel_tol, abs_tol) -> bool">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          First value to check for proximity.
        </Field>

        <Field name="y" type="float" required>
          Second value to check for proximity.
        </Field>

        <Field name="rel_tol" type="float" defaultVal="1e-9">
          Relative tolerance for proximity check.
        </Field>

        <Field name="abs_tol" type="float" defaultVal="0.0">
          Absolute tolerance for proximity check.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_isnan" />

### `isnan()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="isnan" type="(x) -> bool">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_log" />

### `log()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="log" type="(x) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_log10" />

### `log10()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="log10" type="(x) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_log2" />

### `log2()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="log2" type="(x) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_pow" />

### `pow()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="pow" type="(x, y) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Base value to calculate exponentiation.
        </Field>

        <Field name="y" type="float" required>
          Exponent (power) value to calculate exponentiation.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_sin" />

### `sin()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="sin" type="(x) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_sqrt" />

### `sqrt()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="sqrt" type="(x) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_tan" />

### `tan()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="tan" type="(x) -> float">
      Standard function of Indie math package (similar to Python's).

      <Expandable title="parameters info">
        <Field name="x" type="float" required>
          Number on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***
