# How to round a number to a certain number of decimal points within a ZebraTester Inline Script

It is possible to implement rounding of numbers within a ZebraTester script by converting the given number to a string and then creating a substring of the value out of the first number in the string and the number *after* the desired rounding place. Consider the following example:

```
a = "1.624000000000002" 
b = strSubString(a,"1","4") 
print b #this is a comment as denoted by the # character - "b" is now 1.62
```

In the above example, strSubString method uses “1” and the “4” in “1.624” to create a new value shortened to the value before “4” - that is, 1.62.


---

# 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.apica.io/platform-docs/zebratester-scripting/zebratester-how-to-articles/how-to-round-a-number-to-a-certain-number-of-decimal-points-within-a-zebratester-inline-script.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.
