The OpenD Programming Language

fabs

Compute the absolute value.

Special Values
xfabs(x)
±0.0+0.0
±∞+∞

It is implemented as a compiler intrinsic.

  1. alias fabs = llvm_fabs!float
  2. alias fabs = llvm_fabs!double
  3. alias fabs = llvm_fabs!real
    import core.math;
    version(LDC)
    @nogc nothrow @safe pure
    alias fabs = llvm_fabs!real

Return Value

|x| References: equivalent to std.math.fabs

Meta