---
name: "VarR8Round"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/VarR8Round"
---

# VarR8Round(3w)

## NAME

**VarR8Round** (OLEAUT32.317)

## SYNOPSIS

HRESULT VarR8Round\
  (\
   double  *dblIn*,\
   int     *nDig*,\
   double\* *pDblOut*\
  )

## DESCRIPTION

Round a **VT\_R8** to a given number of decimal points.

## PARAMS

*dblIn* **\[In\]**  Source.

*nDig* **\[In\]**  Number of decimal points to round to.

*pDblOut* **\[Out\]**  Destination for rounded number.

## RETURNS

**Success:** **S\_OK**. *pDblOut* is rounded to *nDig* digits.

**Failure:** **E\_INVALIDARG**, if cDecimals is less than **0.**

## NOTES

The native version of this function rounds using the internal binary representation of the number. Wine uses the dutch rounding convention, so therefore small differences can occur in the value returned. **MSDN** says that you should use your own rounding function if you want rounding to be predictable in your application.

## IMPLEMENTATION

Declared in **"oleauto.h"**.

Implemented in **"dlls/oleaut32/vartype.c"**.

Debug channel **"variant"**.
