---
name: "PGARandomUniform"
section: "5"
platform: "linux"
package: "pgapack"
version: "1.1.1-3"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/PGARandomUniform/5"
---

# PGARandomUniform(5)

returns a uniform random number on the interval \[start,end\]

## NAME

PGARandomUniform - returns a uniform random number on the interval \[start,end\]

## INPUT PARAMETERS

- ctx

  \- context variable

- start

  \- starting (double) value of the interval

- end

  \- ending   (double) value of the interval

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
double  PGARandomUniform(ctx, start, end)
PGAContext *ctx
double start
double end
```

## LOCATION

random.c

## EXAMPLE

```
Example:
Generate a uniform random number on the interval [-0.5, 1.5]
PGAContext *ctx;
double r;
:
r = PGARandomUniform(ctx, -0.5, 1.5);
```
