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

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

Re: possible bug in awk's x^y


From: Aharon Robbins
Subject: Re: possible bug in awk's x^y
Date: Sat, 29 Jan 2011 21:36:53 +0200
User-agent: Heirloom mailx 12.4 7/29/08

Hi.

Can you show me some code?  It's hard for me to judge what's happening
without code to look at and test. You also need to please indicate which
gawk version you are using (output of gawk --version) and on what kind
of system (linux, windoes, something else...).  All of this is important
information.

Thanks,

Arnold

> Date: Fri, 28 Jan 2011 20:54:00 -0800
> From: John Wheeler <address@hidden>
> To:  address@hidden
> Subject: possible bug in awk's x^y
>
> I found in evaluating e = lim_{n-> inf} (1+1/n)^n
> for n = 2^m
> that gawk
> 1. became slow
> 2. failed to be accurate at about single precision arithmetic.
> When I instead calculated exp(n*log(1+1/n))
> it ran much faster and attained full double precision arithmetic.
> When I tried
> x = n + sqrt(3)
> it ran fast, but again only produced single precision reliability.
> This leads me to suspect there is a bug in the implementation of gawk's x^y.
> Comments?
> John Wheeler
> address@hidden
> 858-699-2585



reply via email to

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