fabien van mook

all packages "fvm-*"

package "fvm-real2text"

function file "real2text_decompose.m"

Function rt = real2text_decompose(rt)

returns the struct after the insertion of 
decomposition data, which are obtained from 
text representations of reals produced by 
function real2text_sprintf().

The input struct rt must have the following fields:
  rt.data     (vectorised input as a one-dimensional 
               cell-array, in which each finite real
               has been replaced by a string)
  rt.realtype (vector of integers classifying each 
               element in rt.data with 
               value 0 for a non-real,
               value 1 for a finite real, and
               values 2...5 for non-finite reals 
               -Inf, +Inf, NaN and NA, respectively)
  rt.precision (string with the sprintf-template, 
                or integer >= 0)

The output struc rt contains new or renewed fields:
  rt.decomp.mnt (one-dimensional cell-array of strings 
                 consisting of the sign and mantissa)
  rt.decomp.pot (one-dimensional cell-array of signed 
                 integers indicating the power-of-ten 
                 of the first digit in the mantissa)
  rt.decomp.nsd (one-dimensional cell-array of integers 
                 indicating the number of significant 
                 digits, i.e. length(rt.decomp.mnt{k}) - 1)

If rt.precision == 0, trailing zeros in the text
representations of reals in rt.data are removed 
and ignored.


(c) 2026 fabien van mook

2026.08.20 release of this file within package "fvm-real2text" under GNU GPLv3+