[Libreoffice-bugs] [Bug 133840] Calc Math error on INTEGER function

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Sep 12 17:09:30 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=133840

--- Comment #4 from b. <newbie-02 at gmx.de> ---
Created attachment 165422
  --> https://bugs.documentfoundation.org/attachment.cgi?id=165422&action=edit
test_mod_save_against_fp-rounding_errors

besides that i'd read somewhere that gcc has! a 'decimal' library, and thus
implementing correct decimal math shouldn't be too big an issue ... 

(ok, 'performance', but plenty sheets are 'small', and most performance
problems can be thrown on hardware today, the hours and days that users and
supporters waste with irritations about fp-rounding-issues are in my opinion
much worse than a few microseconds of computing time) 

... i was curious if it is possible to solve some of the FP problems with
'intelligent rounding', here is my first try, not a solution, just an attempt
of a proof of concept, 

the user defined macro function 'mod_s' rounds the result acc. to the decimal
places of the values, and returns a better result for
'=INT(MOD_S(11.09,0.1)*100)' than the standard 'mod' of calc with
'=INT(MOD(11.09,0.1)*100)' does, 

i'm not! sure if this works for all cases / values, i didn't even code or test
it with fractional modulators in mind, it was tricky enough to get it to work
because in calc not even 'mod' in formulas is compatible with 'mod' in basic
macros :-( , it is 'unfinished work', i just want to 'throw it to the people'
for examination and discussion ...

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200912/ad55336a/attachment.htm>


More information about the Libreoffice-bugs mailing list