13.3 Features for scientific programming

FWEB contains a few features particularly intended for scientific programming.

  1. Several built-in functions generate numerical constants. See ‘$PI’ ($PI: Pi) and ‘$E’ ($E: Base of the natural logarithms).
  2. Several built-in functions perform mathematical manipulations. See ‘$EXP’ ($EXP: Exponential function), ‘$POW’ ($POW: Exponentiation), ‘$SQRT’ ($SQRT: Square root), ‘$LOG’ ($LOG: Natural logarithm), ‘$LOG10’ ($LOG10: Logarithm to the base 10), ‘$MAX’ ($MAX: Maximum of a list), and ‘$MIN’ ($MIN: Minimum).
  3. The do-loop macro ‘$DO’ may be useful. See $DO: Macro do loop.
  4. C-style array indices can be used by means of the ‘-n)’ option. See -n)’: Reverse array indices [FORTRAN] (FTANGLE).
  5. An active bracket feature helps improve the appearance of woven code that uses subscripts and/or superscripts heavily. See -W[’: Process bracketed array indices.