7 ms·
It could also be a tagged value. These are quite common in code created by "high reliability" languages (Ada, OCaml). The high bits are used to carry some metad
by datenwolf 7y ago
It could also be a tagged value. These are quite common in code created by "high reliability" languages (Ada, OCaml). The high bits are used to carry some metadata.
E.g. you might want to set a certain bit if the value went outside the defined input range of a function (think for example far from the accepted numerical window of a Taylor series expansion). Instead of dealing error conditions at each and every step (thereby making the timing properties of the code unpredictable) you just collect all error conditions and at the end decide if you discard the value, or just use it partially (e.g. it might still be "good enough" to be used as a parametizing input of an adaptive filter, where it averages out with the rest).