*min*reduction, the initial value of the private copy should be the "largest representable value in the reduction list item type" (OpenMP 3.1, p. 104, l. 1). For a list item of type

*float*, would that be

**FLT_MAX**, or infinity (assuming the C/C++ implementation supports infinities)?

Consider the following program:

Code: Select all

```
#include <float.h>
#include <math.h>
#include <stdio.h>
int main(void) {
float min_val = 0.0f;
#pragma omp parallel reduction(min:min_val) num_threads(1)
if (isinf(min_val))
printf("initial min_val: inf\n");
else if (min_val == FLT_MAX)
printf("initial min_val: FLT_MAX\n");
}
```

I think that

*infinity*makes more sense, but it isn't clear to me whether or not the C11 standard considers infinity a "representable value" for real floating types.

If

**FLT_MAX**is the correct answer, it would be beneficial to change the wording in the OpenMP spec on p. 104, l. 1 to:

Ifmax Least representablefinitevalue in the reduction list item type

min Largest representablefinitevalue in the reduction list item type

*infinity*is the correct answer for C/C++ implementations supporting infinities, it would be helpful to make that explicit in the OpenMP spec.