PetscScalarPrecision — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscScalarPrecision

Names of the floating-point precisions that a `PetscScalar` could in principle be built with

## Synopsis

    typedef enum {
      PETSC_SCALAR_DOUBLE,
      PETSC_SCALAR_SINGLE,
      PETSC_SCALAR_LONG_DOUBLE,
      PETSC_SCALAR_HALF
    } PetscScalarPrecision;

## Values

- `PETSC_SCALAR_DOUBLE` - IEEE double precision

- `PETSC_SCALAR_SINGLE` - IEEE single precision

- `PETSC_SCALAR_LONG_DOUBLE` - C `long double` precision

- `PETSC_SCALAR_HALF` - IEEE half precision

## Note

This enum is reserved for situations where an object might be created in a precision different from `PetscScalar`; the current PETSc code does not use it.

## See Also

`PetscScalar`, `PetscReal`, `PetscComplex`

## Level

developer

## Location

include/petscmath.h

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages