On Wed, 19 Oct 2011, David Cantrell wrote:
I would like to be able to:
* mark a variable as being an approximation, and with how precise it is;
THAT is already present. "float" in C means that it is an approximation
to 24 binary significant digits.
It does NOT, admittedly, however, tell you that any numbers that it was
based on were also only approximate.
* for those markers to propagate to any result that
arises from a
calculation involving that variable;
THAT would be NICE!
I'm curious how you would implement it. I guess that you could create a
"floatpt struct" that contains a float and an int count of how many floats
were used to create the value. That count could "approximate" how many of
the least significant bits are meaningless.
--
Grumpy Ol' Fred cisin at
xenosoft.com