---
name: "PR_SET_FPEXC"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/PR_SET_FPEXC"
---

# PR\_SET\_FPEXC(2const)

set the floating-point exception mode

## NAME

PR\_SET\_FPEXC - set the floating-point exception mode

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <linux/prctl.h>  /* Definition of PR_* constants */
#include <sys/prctl.h>
```

**int prctl(PR\_SET\_FPEXC, unsigned long** *mode***);**

## DESCRIPTION

Set floating-point exception mode to *mode*, which can be one of the following values.

- **PR\_FP\_EXC\_SW\_ENABLE**

  Use FPEXC for FP exception enables.

- **PR\_FP\_EXC\_DIV**

  Use FPEXC for floating-point divide by zero.

- **PR\_FP\_EXC\_OVF**

  Use FPEXC for floating-point overflow.

- **PR\_FP\_EXC\_UND**

  Use FPEXC for floating-point underflow.

- **PR\_FP\_EXC\_RES**

  Use FPEXC for floating-point inexact result.

- **PR\_FP\_EXC\_INV**

  Use FPEXC for floating-point invalid operation.

- **PR\_FP\_EXC\_DISABLED**

  Use FPEXC for FP exceptions disabled.

- **PR\_FP\_EXC\_NONRECOV**

  Use FPEXC for async nonrecoverable exception mode.

- **PR\_FP\_EXC\_ASYNC**

  Use FPEXC for async recoverable exception mode.

- **PR\_FP\_EXC\_PRECISE**

  Use FPEXC for precise exception mode.

## RETURN VALUE

On success, 0 is returned. On error, -1 is returned, and *errno* is set to indicate the error.

## ERRORS

- **EINVAL**

  *mode* is not a valid value.

## STANDARDS

Linux. PowerPC only.

## HISTORY

Linux 2.4.21, 2.5.32. (PowerPC)

## SEE ALSO

[**prctl**(2)](/prctl/2.md), [**PR\_GET\_FPEXC**(2const)](/PR_GET_FPEXC/2const.md)
