Sets the number format of a numeric entity.
xis a number, a vector, or a matrix
fmtis a string
SetNumberFormat(x, fmt) returns
x with the number format set to
fmt is one of the following values:
The global setting will be used.
Standard format. Very large and very small numbers are displayed in scientific (exponential) notation, and only such numbers. Insignificant zeros are not included.
"default"except that rational numbers are written as the quotient of two integers instead of using decimal notation.
Numbers are written without scientific notation if at all possible and if so with a fixed number of digits after the decimal separator. Trailing zeros in the fractional part are used, if necessary, to achieve this.
All numbers are written in scientific notation with exactly one digit before the decimal separator and a fixed total number of digits. Trailing zeros are used if necessary.
L ≔ '(1/69, 16/5, 952361745213/7, 5.32E20); F ≔ '("default", "fraction", "fixed", "scientific");
ToTable(F @ (f ↦ '(f) ~ L @ (x ↦ SetNumberFormat(x\5, f))))