Re: [libreoffice-users] ROUND function consistency

2022-06-06 Thread Steve Edmonds
I agree this is not a bug and also find the different functions are not consistent in their approach. Some investigation and analysis shows that using bankers rounding results in less accumulated rounding error or bias when processing monetary values than the ROUND() function in Calc. I have

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Steve Edmonds
, 5 Jun 2022 11:37:04 +0200 Subject:Re: [libreoffice-users] ROUND function consistency To: LibreOffice Användare Looks like a bug to me. 12.125 returns 12.12, but 12.1251 returns 12.13. Both should return the same. I guess this bug should be reported. Meanwhile

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Andrew Pitonyak
Sorry, this is NOT a bug. This is exactly the result I expect if I was using VBA in MSO. Read on to find out why.  I say this without looking at the code, but, you specifically told LO to use the VBA version of rounding, which is NOT normal rounding. VBA rounding uses bankers rounding. 

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Virgil Arrington Jr.
On 6/5/2022 6:54 AM, Michael H wrote: Are you sure it isn't somewhere else? I.e. the input to the actual round step from the vb and the LO function? LO automatically shortens numbers and rounds them as it does so... so a that shows 12.15 may actually contain 12.1499 or 12.151 This

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Michael D. Setzer II
, and would do same for 0 to 4, and 6 to 9, and then vary if 3rd was 5? Might be another way, but that seemed to work.. On 5 Jun 2022 at 12:49, Johnny Rosenberg wrote: From: Johnny Rosenberg Date sent:60;Sun, 5 Jun 2022 12:49:42 +0200 Subject: ;Re: [libreoffice-users] ROUND function consisten

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Michael H
Are you sure it isn't somewhere else? I.e. the input to the actual round step from the vb and the LO function? LO automatically shortens numbers and rounds them as it does so... so a that shows 12.15 may actually contain 12.1499 or 12.151 On Sat, Jun 4, 2022 at 9:45 PM Steve Edmonds

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Johnny Rosenberg
gt; > > > On 5 Jun 2022 at 11:37, Johnny Rosenberg wrote: > > From: Johnny Rosenberg > > Date sent: Sun, 5 Jun 2022 11:37:04 +0200 > Subject:Re: [libreoffice-users] ROUND function > consistency > To:

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Michael D. Setzer II
Rosenberg Date sent: Sun, 5 Jun 2022 11:37:04 +0200 Subject:Re: [libreoffice-users] ROUND function consistency To: LibreOffice Användare > Looks like a bug to me. 12.125 returns 12.12, but 12.1251 returns 12.13. > Both should return the sam

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Johnny Rosenberg
I just found that you can do this with the already existing Format() function. No need for making your own function and no need for using VBA compatibility: Print Format(12.125, "0.00") The second parameter is what you would have written in the ”Format code” field when formatting a cell in Calc.

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Johnny Rosenberg
Looks like a bug to me. 12.125 returns 12.12, but 12.1251 returns 12.13. Both should return the same. I guess this bug should be reported. Meanwhile, you can make your own function that you can use. Here are two different suggestions. 1: This one use the Calc built-in ROUND() cell function. Place

[libreoffice-users] ROUND function consistency

2022-06-04 Thread Steve Edmonds
I have just put a basic macro together so it will calculate income tax due from our local tax rates. I needed to round the tax to the nearest cent so taking the easy route I added Option VBASupport 1 to use the available VB round function. I then noticed that the VB round function with say