bug-gnu-pspp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PSPP-BUG: [bug #51235] Wrong rounding of decimals in FACTOR output?


From: Ben Pfaff
Subject: PSPP-BUG: [bug #51235] Wrong rounding of decimals in FACTOR output?
Date: Fri, 16 Jun 2017 11:28:28 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #5, bug #51235 (project pspp):

> I think the problem is in data-out.c - the function should_round_up is a bit
too naive: 

I think that's a misunderstanding.  First, my notes and the comments in
data-out.c say that SPSS follows the unusual policy that ties are always
rounded away from zero, so that the basic idea that '5' rounds up is correct.

But more importantly, should_round_up() is supposed to be looking at a
formatted number that has as many decimals as necessary to make a decision. 
The formatting is done by rounder_init(), which has logic that is supposed to
supply extra digits when an ambiguous case comes up.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51235>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]