Skip to content

scalar.FastMathFlags enum

← Attribute reference

IEEE 754 fast-math relaxation flags for float operations. nnan and ninf are independent author promises, not runtime checks or requests to clamp results. Together they guarantee finite floating-point results, but do not imply exact representability in a narrower type or absence of subnormals. Behavior outside an authored promise is not constrained by the operation's ordinary special-value contract. Flags do not refine unrelated uses of an operand.

Cases

Keyword Value Description
reassoc 1 Allow reassociation.
nnan 2 Assume floating-point operands and results are not NaN, independently for every vector element.
ninf 4 Assume floating-point operands and results are not infinite, independently for every vector element.
nsz 8 Permit treating positive and negative zero as interchangeable; this does not exclude zero results.
arcp 16 Allow reciprocal approximation.
contract 32 Allow contractions (FMA).
afn 64 Approximate functions.
fast 127 All of the above.

Used by

  • scalar.absf.fastmath
  • scalar.acosf.fastmath
  • scalar.acoshf.fastmath
  • scalar.addf.fastmath
  • scalar.asinf.fastmath
  • scalar.asinhf.fastmath
  • scalar.atan2f.fastmath
  • scalar.atanf.fastmath
  • scalar.atanhf.fastmath
  • scalar.cbrtf.fastmath
  • scalar.ceilf.fastmath
  • scalar.clampf.fastmath
  • scalar.cmpf.fastmath
  • scalar.copysignf.fastmath
  • scalar.coshf.fastmath
  • scalar.divf.fastmath
  • scalar.erfcf.fastmath
  • scalar.erff.fastmath
  • scalar.exp2f.fastmath
  • scalar.expf.fastmath
  • scalar.expm1f.fastmath
  • scalar.floorf.fastmath
  • scalar.fmaf.fastmath
  • scalar.geluf.fastmath
  • scalar.log10f.fastmath
  • scalar.log1pf.fastmath
  • scalar.log2f.fastmath
  • scalar.logf.fastmath
  • scalar.logisticf.fastmath
  • scalar.maximumf.fastmath
  • scalar.maxnumf.fastmath
  • scalar.minimumf.fastmath
  • scalar.minnumf.fastmath
  • scalar.mulf.fastmath
  • scalar.negf.fastmath
  • scalar.powf.fastmath
  • scalar.remf.fastmath
  • scalar.roundevenf.fastmath
  • scalar.roundf.fastmath
  • scalar.rsqrtf.fastmath
  • scalar.siluf.fastmath
  • scalar.sinhf.fastmath
  • scalar.softplusf.fastmath
  • scalar.sqrtf.fastmath
  • scalar.subf.fastmath
  • scalar.tanf.fastmath
  • scalar.tanhf.fastmath
  • scalar.truncf.fastmath