hello @John Denker,
> There are issues with floating point.
agree,
> AFAICT the real topic here is not a gnumeric issue,
let's concentrate on what gnumeric can! do:
- 'rounddown' and 'roundup' sometimes producing wrong results.
AFAICT IEEE , 'C' or 'C++' don't let you round to 'places',
hello @Steve, hello@all,
> because Gnumeric is trying to emulate bug-for-bug compatibility with Excel?
you made my day!, very nicely expressed.
yes, most likely such will be the reason.
regarding the 4 being rounded up ... the standard rounding process in gnumeric has no access to the
On Wed, Jul 07, 2021 at 06:01:26PM +0200, newbie nullzwei wrote:
>regarding the 4 being rounded up ... the standard rounding process in
>gnumeric has no access to the digit '4', instead in the process of
>rounding to 16 digits the '4' in 17th place becomes powered up to a ',5'
>
Gnumeric's rounding here is indeed done with
round_to_int(x * 10^d) / 10^d
except that round_to_int deliberately misrounds 0.5-1ulp to 1. That's
not important here.
This means that, in general, you should not expect last-bit accuracy
for this operation. Both the multiplication and the
On 7/7/21 9:15 AM, newbie nullzwei via gnumeric-list wrote:
> > because Gnumeric is trying to emulate bug-for-bug compatibility with Excel?
>
> you made my day!, very nicely expressed.
No.
This has nothing to do with excel.
It has nothing to do with gnumeric.
It's not a bug in the code.
What
On Wed, Jul 07, 2021 at 06:16:46PM -0400, Morten Welinder wrote:
> Gnumeric's rounding here is indeed done with
>
> round_to_int(x * 10^d) / 10^d
>
> except that round_to_int deliberately misrounds 0.5-1ulp to 1. That's
> not important here.
Thank you Morten for introducing some reality
On Wed, Jul 07, 2021 at 11:35:53AM -0700, John Denker via gnumeric-list wrote:
> This has nothing to do with excel.
> It has nothing to do with gnumeric.
> It's not a bug in the code.
It is a bug in Gnumeric's rounding. "Floating point is inexact" is not
an excuse to sweep incorrect rounding
hello @ Steven,
> Do you know for a fact that Gnumeric implements its rounding by
multiplying 0,344 * 1E16 or are you guessing?
from functions.c / gnumeric_round:
gnm_float number = value_get_as_float (argv[0]);
gnm_float digits = argv[1] ? value_get_as_float (argv[1])
On 7/7/21 2:41 PM, Steven D'Aprano wrote:
> Do you know for a fact that Gnumeric implements its rounding by
> multiplying 0,344 * 1E16 or are you guessing?
Use the source, Luke.
There's no need for guessing. Here's what gnumeric does:
> double
> go_fake_floor (double x)
> {
>
On Mon, Jul 05, 2021 at 08:23:02PM +0200, newbie nullzwei via gnumeric-list
wrote:
>> I don't understand what you mean by "crossover",
>
>=rounddown(0,24997;16) -> 0,25000, and
>=roundup(0,24997;16) -> 0,249972244, the
>
10 matches
Mail list logo