# Protocol Math

The Agile protocol contracts use a system of exponential math, [Exponential.sol](https://github.com/agilefinance/agile-protocol/blob/master/contracts/Exponential.sol), in order to represent fractional quantities with sufficient precision.

Most numbers are represented as a mantissa, an unsigned integer scaled by `1 * 10 ^ 18`, in order to perform basic math at a high level of precision.

{% content-ref url="/pages/Zn7ZpBW7pqNonWUD21Av" %}
[aToken and Underlying Decimals](/getting-started/protocol-math/atoken-and-underlying-decimals.md)
{% endcontent-ref %}

{% content-ref url="/pages/tPA5YpHdmlrMGwoLVr8o" %}
[Interpreting Exchange Rates](/getting-started/protocol-math/interpreting-exchange-rates.md)
{% endcontent-ref %}

{% content-ref url="/pages/VE9UkjolwzoTZm6cmMqW" %}
[Calculating Accrued Interest](/getting-started/protocol-math/calculating-accrued-interest.md)
{% endcontent-ref %}

{% content-ref url="/pages/UzucOGASG6LCnNbRMdYD" %}
[Calculating the APY Using Rate Per Block](/getting-started/protocol-math/calculating-the-apy-using-rate-per-block.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.agilefi.org/getting-started/protocol-math.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
