> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/pricing-advisor-api/pricing-advisor-api/core-concepts/rounding.md).

# Rounding

Rounding is a process of altering a number with an approximate value that is a simpler representation of the actual number. Rounding direction is the progression that a number undergoes either to its next highest, or next lowest number. ESW uses standard rounding directions in its rounding models.

There are three rounding directions that you can incorporate in your rounding models: Up, Down, and Nearest.

{% tabs %}
{% tab title="Up" %}
Round to the next highest number.

#### Examples

* Whole numbers: If the number is `1706.00`, the rounding target is `10`, and the direction is Up, the rounded value is `1710.00`.
* Decimal numbers: If the number is `1700.06`, the rounding target is `10`, and the direction is Up, the rounded value is `1700.10`.
  {% endtab %}

{% tab title="Down" %}
Round to the next lowest number.

#### Examples

* Whole numbers: If the number is `1714.00`, the rounding target is `10`, and the direction is Down, the rounded value is `1710.00`.
* Decimal numbers: If the number is `1700.14`, the rounding target is `10`, and the direction is Down, the rounded value is `1700.10`.
  {% endtab %}

{% tab title="Nearest" %}
Round to the closest value.

* If the number is between `0–4` and the rounding target is `10`, the result rounds Down.
* If the number is between `5–9` and the rounding target is `10`, the result rounds Up.

#### Examples

* Whole numbers: If the number is `1704.00` and the direction is Nearest, the rounded value is `1700.00`.
* Whole numbers: If the number is `1705.00` and the direction is Nearest, the rounded value is `1710.00`.
* Decimal numbers: If the number is `1700.14` and the direction is Nearest, the rounded value is `1700.10`.
* Decimal numbers: If the number is `1700.15` and the direction is Nearest, the rounded value is `1700.20`.
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developer.esw.com/pricing-advisor-api/pricing-advisor-api/core-concepts/rounding.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
