hello Morten,
acc. to a proposal of John Denker to work around wrong floor() results for 'zombie values' by
floor(x) < x ? floor(x) : floor(x) - 1;
i'd try to put it into goffice/goffice/math/go-math.c, and it seems to work.
would you mind to check the code:
---
thank you,
you are right,
but then frexp() calculates something different to 'extracting the parts (sign, mantissa and exponent) of the IEEE double representation',
(IEEE double mantissa for normalized values has to be [1 .. 2[), may be frep() calculates exactly half the mantissa and exponent
On 7/8/21 10:52 AM, b. via gnumeric-list wrote:
> i wanted to ask for some concrete help, not to start again long discussions
> about the inaccuracy of fp-math, IEEE, gnumeric, Excel and Calc.
Sometimes it's better to get the answer that is correct rather
than the answer you wanted or expected.