Skip to content

vector.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

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