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
, 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
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.
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
, 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
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
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:
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
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.
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
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
11 matches
Mail list logo