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

--- Comment #27 from k...@cox.net ---
(In reply to Jean-Baptiste Faure from comment #26)
> For me MOD() function should be used only with integers. With implementation
> in LibreOffice, and if you are sure that the dividende is integer, you can
> use an expression like =MOD(ROUND(0.9*100;0);10).
> 
> I think it is a bad idea to generalize MOD() function to non-integer
> numbers. The bug is here.
> 
> Best regards. JBF

For you perhaps; but there are legitimate uses of MOD() that involve real
numbers. Furthermore, the interim calculation performed by MOD() is expected to
be a real number, because it it were not, the result of MOD() would always be
zero. The problem being discussed here is not caused by the type of input, but
by how the MOD() function, as implemented in LO (and all other Linux
spreadsheets I have tried), deals with the facts that calculations performed by
the spreadsheet are real number calculations, and their results are often
inexact in the last three digits used.

You appear to be saying that every use of MOD() should look like this:
=MOD(ROUND([dividend],[n]),[divisor]) ...or...
=MOD([dividend],ROUND([divisor],[n])) ...or...
=MOD(ROUND([dividend],[n]),ROUND([divisor],[n])) ...instead of...
=MOD([dividend],[divisor])

The LO implementation of the MOD() function appears to make the incorrect
assumption that the interim results of its calculations can be used without
regard to the fact that digital calculations with real number cause precision
loss in the last 3 or 4 digits. As with human thought, incorrect assumptions
can lead to wrong answers.

Changing the instructions for using a function does not correct a bug. Users
will not expect to have to read the instructions for every function they have
used in Excel for years, before using them in LO (etc.). Programmers seem to
not understand that the computer, and therefore the software, is supposed to
allow the user to work efficiently. When software forces the user to work a
certain way, the programmer is making the incorrect assumption that he/she
knows the user's job as well as the user does.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to