bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] (no subject)


From: David Kaspar [Dee'Kej]
Subject: Re: [bug-gawk] (no subject)
Date: Mon, 20 Nov 2017 16:01:22 +0100

Ah, sorry for the missing Subject... :( Somehow Google didn't stop me this time before sending it... :-/

David Kaspar [Dee'Kej]
Associate Software Engineer

Brno, Czech Republic


RED HAT | TRIED. TESTED. TRUSTED.
Every airline in the Fortune 500 relies on Red Hat.
Find out why at Trusted | Red Hat.

On Mon, Nov 20, 2017 at 3:52 PM, David Kaspar [Dee'Kej] <address@hidden> wrote:
Hello folks,

we have received a new BZ report for a different behaviour of Gawk when MPFR is used and when it is not. Reproducer script:

BEGIN {
  ROUNDMODE = "A"
  x = 2.21
  printf "%4.2f\n",x
  printf "%3.1f\n",x
  exit
}

$ gawk -f ./script
2.21
2.2

$ gawk -M -f ./script
2.21
2.3

The interesting discussion about this was also here - https://forums.fedoraforum.org/showthread.php?316207-Setting-gawk-ROUNDMODE&p=1798362#post1798362 :
"Hmm, looks like Gawk is just (unintentionally) doing with ROUNDMODE="A" what MPFR is doing with its MPFR_RNDA: it's rounding away from zero at all times, not just for ties."

Is this really a bug, or just user expecting something wrong from gawk?

Best regards,

David Kaspar [Dee'Kej]
Associate Software Engineer

Brno, Czech Republic


RED HAT | TRIED. TESTED. TRUSTED.
Every airline in the Fortune 500 relies on Red Hat.
Find out why at Trusted | Red Hat.


reply via email to

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