---
name: "std::tr1::subtract_with_carry_01"
section: "3"
platform: "linux"
package: "libstdc++6-4.2-doc"
version: "4.2.4-6"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/std::tr1::subtract_with_carry_01"
---

# std::tr1::subtract\_with\_carry\_01(3)

## NAME

std::tr1::subtract\_with\_carry\_01 -

## SYNOPSIS

## Detailed Description

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> class std::tr1::subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \>

Definition at line 843 of file random.

### Public Types

typedef \_RealType **result\_type**\

### Public Member Functions

**result\_type** **max** () const \
 **result\_type** **min** () const \
 **result\_type** **operator()** ()\
 template\<class \_Gen\> void **seed** (\_Gen &\_\_g)\
 void **seed** (unsigned long \_\_value=19780503)\
 template\<class \_Gen\> **subtract\_with\_carry\_01** (\_Gen &\_\_g)\
 **subtract\_with\_carry\_01** (unsigned long \_\_value)\
 **subtract\_with\_carry\_01** ()\

### Static Public Attributes

static const int **long\_lag**\
 static const int **short\_lag**\
 static const int **word\_size**\

### Friends

bool **operator!=** (const **subtract\_with\_carry\_01** &\_\_lhs, const **subtract\_with\_carry\_01** &\_\_rhs)\
 template\<typename \_RealType1, int \_\_w1, int \_\_s1, int \_\_r1, typename \_CharT, typename \_Traits\> **std::basic\_ostream**\< \_CharT, \_Traits \> & **operator\<\<** (**std::basic\_ostream**\< \_CharT, \_Traits \> &\_\_os, const **subtract\_with\_carry\_01**\< \_RealType1, \_\_w1, \_\_s1, \_\_r1 \> &\_\_x)\
 bool **operator==** (const **subtract\_with\_carry\_01** &\_\_lhs, const **subtract\_with\_carry\_01** &\_\_rhs)\
 template\<typename \_RealType1, int \_\_w1, int \_\_s1, int \_\_r1, typename \_CharT, typename \_Traits\> **std::basic\_istream**\< \_CharT, \_Traits \> & **operator\>\>** (**std::basic\_istream**\< \_CharT, \_Traits \> &\_\_is, **subtract\_with\_carry\_01**\< \_RealType1, \_\_w1, \_\_s1, \_\_r1 \> &\_\_x)\

## Member Typedef Documentation

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> typedef \_RealType std::tr1::subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \>::result\_type

The type of the generated random value.

Definition at line 847 of file random.

## Constructor & Destructor Documentation

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> std::tr1::subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \>::subtract\_with\_carry\_01 ()` [inline]`

Constructs a default-initialized % **subtract\_with\_carry\_01** random number generator.

Definition at line 858 of file random.

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> std::tr1::subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \>::subtract\_with\_carry\_01 (unsigned long \_\_value)` [inline, explicit]`

Constructs an explicitly seeded % **subtract\_with\_carry\_01** random number generator.

Definition at line 869 of file random.

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> template\<class \_Gen\> std::tr1::subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \>::subtract\_with\_carry\_01 (\_Gen & \_\_g)` [inline]`

Constructs a % **subtract\_with\_carry\_01** random number generator engine seeded from the generator function `__g`.

**Parameters:**

*\_\_g* The seed generator function.

Definition at line 882 of file random.

## Member Function Documentation

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> result\_type std::tr1::subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \>::max () const` [inline]`

Gets the maximum value of the range of random floats returned by this generator.

Definition at line 916 of file random.

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> result\_type std::tr1::subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \>::min () const` [inline]`

Gets the minimum value of the range of random floats returned by this generator.

Definition at line 908 of file random.

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \>::result\_type std::tr1::subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \>::operator() ()` [inline]`

Gets the next random number in the sequence.

Definition at line 494 of file random.tcc.

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> template\<class \_Gen\> void std::tr1::subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \>::seed (\_Gen & \_\_g)` [inline]`

Seeds the initial state $ x\_0 $ of the % **subtract\_with\_carry\_01** random number generator.

Definition at line 900 of file random.

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> void std::tr1::subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \>::seed (unsigned long \_\_value = `19780503`)` [inline]`

Seeds the initial state $ x\_0 $ of the random number generator.

Definition at line 453 of file random.tcc.

## Friends And Related Function Documentation

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> bool operator!= (const subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \> & \_\_lhs, const subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \> & \_\_rhs)` [friend]`

Compares two % **subtract\_with\_carry\_01** random number generator objects of the same type for inequality.

**Parameters:**

*\_\_lhs* A % **subtract\_with\_carry\_01** random number generator object.\
 *\_\_rhs* Another % **subtract\_with\_carry\_01** random number generator object.

**Returns:**

true if the two objects are not equal, false otherwise.

Definition at line 960 of file random.

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> template\<typename \_RealType1, int \_\_w1, int \_\_s1, int \_\_r1, typename \_CharT, typename \_Traits\> std::basic\_ostream\<\_CharT, \_Traits\>& operator\<\< (std::basic\_ostream\< \_CharT, \_Traits \> & \_\_os, const subtract\_with\_carry\_01\< \_RealType1, \_\_w1, \_\_s1, \_\_r1 \> & \_\_x)` [friend]`

Inserts the current state of a % **subtract\_with\_carry\_01** random number generator engine `__x` into the output stream `__os`.

**Parameters:**

*\_\_os* An output stream. \
 *\_\_x* A % **subtract\_with\_carry\_01** random number generator engine.

**Returns:**

The output stream with the state of `__x` inserted or in an error state.

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> bool operator== (const subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \> & \_\_lhs, const subtract\_with\_carry\_01\< \_RealType, \_\_w, \_\_s, \_\_r \> & \_\_rhs)` [friend]`

Compares two % **subtract\_with\_carry\_01** random number generator objects of the same type for equality.

**Parameters:**

*\_\_lhs* A % **subtract\_with\_carry\_01** random number generator object. \
 *\_\_rhs* Another % **subtract\_with\_carry\_01** random number generator object.

**Returns:**

true if the two objects are equal, false otherwise.

Definition at line 937 of file random.

### template\<typename \_RealType, int \_\_w, int \_\_s, int \_\_r\> template\<typename \_RealType1, int \_\_w1, int \_\_s1, int \_\_r1, typename \_CharT, typename \_Traits\> std::basic\_istream\<\_CharT, \_Traits\>& operator\>\> (std::basic\_istream\< \_CharT, \_Traits \> & \_\_is, subtract\_with\_carry\_01\< \_RealType1, \_\_w1, \_\_s1, \_\_r1 \> & \_\_x)` [friend]`

Extracts the current state of a % **subtract\_with\_carry\_01** random number generator engine `__x` from the input stream `__is`.

**Parameters:**

*\_\_is* An input stream. \
 *\_\_x* A % **subtract\_with\_carry\_01** random number generator engine.

**Returns:**

The input stream with the state of `__x` extracted or in an error state.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
