---
name: "ACE_Stats_Value"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_Stats_Value"
---

# ACE\_Stats\_Value(3)

Helper class for ACE\_Stats.

## NAME

ACE\_Stats\_Value -  Helper class for ACE\_Stats.

## SYNOPSIS

```
#include <ace/Stats.h>
class ACE_Stats_Value
{
  public:
    ACE_Stats_Value (const u_int precision);
    u_int precision (void) const;
    void whole (const ACE_UINT32);
    ACE_UINT32 whole (void) const;
    void fractional (const ACE_UINT32);
    ACE_UINT32 fractional (void) const;
    ACE_UINT32 fractional_field (void) const;
    void scaled_value (ACE_UINT64 &) const;
    void dump (void) const;
  private:
    ACE_UINT32 whole_;
    ACE_UINT32 fractional_;
    u_int precision_;
    inline ACE_UNIMPLEMENTED_FUNC (ACE_Stats_Value (void));
};
```

## DESCRIPTION

Container struct for 64-bit signed quantity and its precision.  It would be nicer to use a fixed-point class, but this is sufficient.  Users typically don't need to use this class directly; see ACE\_Stats below.

## PUBLIC MEMBERS

```
ACE_Stats_Value (const u_int precision);
```

Constructor, which requires precision in terms of number of decimal digits.  The more variation in the data, and the greater the data values, the smaller the precision must be to avoid overflow in the standard deviation calculation.  3 might be a good value, or maybe 4.  5 will probably be too large for non-trivial data sets.

```
u_int precision (void) const;
```

Accessor for precision.

```
void whole (const ACE_UINT32);
```

Set the whole\_ field.

```
ACE_UINT32 whole (void) const;
```

Accessor for the whole\_ field.

```
void fractional (const ACE_UINT32);
```

Set the fractional\_ field.

```
ACE_UINT32 fractional (void) const;
```

Accessor for the fractional\_ field.

```
ACE_UINT32 fractional_field (void) const;
```

Calculates the maximum value of the fractional portion, given its precision.

```
void scaled_value (ACE_UINT64 &) const;
```

Access the value as an \_unsigned\_ 64 bit quantity.  It scales the value up by precision decimal digits, so that no precision will be lost.  It assumes that whole\_ is = 0.

```
void dump (void) const;
```

Print to stdout.

## PRIVATE MEMBERS

```
ACE_UINT32 whole_;
```

The integer portion of the value.

```
ACE_UINT32 fractional_;
```

The fractional portion of the value.

```
u_int precision_;
```

The number of decimal digits of precision represented by fractional\_.  Not declared const, so the only way to change it is via the assignment operator.

```
inline ACE_UNIMPLEMENTED_FUNC (ACE_Stats_Value (void));
```

## AUTHORS

David L. Levine

## LIBRARY

ace
