PetscCopysignReal#

Returns the value with the magnitude of a and the sign of b, as a PetscReal

Synopsis#

#include <petscmath.h>
PetscReal PetscCopysignReal(PetscReal a, PetscReal b)

Not Collective; No Fortran Support

Input Parameters#

  • a - the value

  • b - the value

See Also#

PetscReal, PetscScalar, PetscComplex

Level#

beginner

Location#

include/petscmath.h

Examples#

src/ts/tutorials/ex30.c
src/vec/vec/tests/ex66.c


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