Function c = real2mtspot(r,p)
c = real2mtspot(r)
returns a struct with an analysis of real r
given a precision p:
c.val
contains the real r;
c.mts
contains the mantissa of r as a cell array
of strings; each string consists of the sign
followed by the significant digits;
c.pot
contains the magnitude (of the first digit)
of r, i.e. the m-th power-of-ten of r;
c.nsd
contains the number of significant digits
of r. This number is always >= 1 and <= p.
When a real has an non-finite value (NA, NaN, Inf),
c.mts will contain "na"/"nan"/"inf", and c.pot and
c.nsd the value NA.
The default of the optional input argument p is
8. The precision is the number of digits at
which the real is rounded off for analysis.
Note that for p and c.nsd the first digit is
counted; e.g. 1.2 as well as 0.12 have a number
of 2 digits!
Note that "mts" is short for mantissa (the
fractional part of a real), and "pot" for
power-of-ten.
(c) 2026 fabien van mook
2026.08.20 release of this file within package "fvm-real2eng" under GNU GPLv3+