Incorrect MOD function result with negative dividend

Discussion of issues you faced using ONLYOFFICE
Post Reply
mickael9
Posts: 1
Joined: Sat Jun 29, 2019 8:59 am

Incorrect MOD function result with negative dividend

Post by mickael9 » Sat Jun 29, 2019 9:24 am

The MOD function does not yield correct results for negative dividends, eg:

With OnlyOffice:
MOD(-10; 5) = 0
MOD(-9; 5) = 4
MOD(-8; 5) = 3
MOD(-7; 5) = 2
MOD(-6; 5) = 1
MOD(-5; 5) = 0

With Excel/Google sheets/Libreoffice (or with the formula A-B*INT(A/B))
MOD(-10; 5) = 4
MOD(-9; 5) = 1
MOD(-8; 5) = 2
MOD(-7; 5) = 3
MOD(-6; 5) = 4
MOD(-5; 5) = 0

Kate
Posts: 246
Joined: Mon Feb 09, 2015 11:17 am

Re: Incorrect MOD function result with negative dividend

Post by Kate » Mon Jul 01, 2019 7:40 am

Hello,

Would you please send us the file for testing at support@onlyoffice.com?

What ONLYOFFICE solution did you use?

Post Reply