Actual source code: matheq.c

petsc-master 2019-08-18
Report Typos and Errors
  1:  #include <petscsys.h>

  3: /*@C
  4:     PetscEqualReal - Returns whether the two real values are equal.

  6:     Input Parameter:
  7: +     a - first real number
  8: -     b - second real number

 10:     Notes:
 11:     Equivalent to "a == b". Should be used to prevent compilers from
 12:     emitting floating point comparison warnings (e.g. GCC's -Wfloat-equal flag)
 13:     in PETSc header files or user code.

 15:     Level: developer
 16: @*/
 17: PetscBool PetscEqualReal(PetscReal a,PetscReal b)
 18: {
 19:   return (a == b) ? PETSC_TRUE : PETSC_FALSE;
 20: }

 22: /*@C
 23:     PetscEqualScalar - Returns whether the two scalar values are equal.

 25:     Input Parameter:
 26: +     a - first scalar value
 27: -     b - second scalar value

 29:     Notes:
 30:     Equivalent to "a == b". Should be used to prevent compilers from
 31:     emitting floating point comparison warnings (e.g. GCC's -Wfloat-equal flag)
 32:     in PETSc header files or user code.

 34:     Level: developer
 35: @*/
 36: PetscBool PetscEqualScalar(PetscScalar a,PetscScalar b)
 37: {
 38:   return (a == b) ? PETSC_TRUE : PETSC_FALSE;
 39: }