[Top][All Lists]

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

RE: Make division by zero legal

From: Carl Friedberg
Subject: RE: Make division by zero legal
Date: Tue, 3 Aug 2021 18:19:09 +0000

(I am a lurker on the gawk-bug list; and this is my first posting on help-gawk)

I have been following this discussion, and I agree with the view of Neil Ormos. 
There are ways to deal with divide by 0 if you don't want the default behavior; 
please don't change something that is so embedded in GAWK.

My 2 cents, in case anyone is counting 


Carl Friedberg
President, Comet &Company
165 William St New York NY
Office  (212) 233-5470
Cell      (917) 861-7819

-----Original Message-----
From: Help-gawk <> On Behalf Of 
Neil R. Ormos
Sent: Monday, August 2, 2021 10:05 PM
To: Help Gawk List <>
Subject: Re: Make division by zero legal

Andrew J. Schorr wrote:
> Nethox wrote:

>> [...]
>> $ gawk -M 'BEGIN { print 1/0; print "workaround" }'
>> +inf
>> workaround

> I can't speak to why gawk currently crashes on division by zero; it 
> does seem odd that -M behaves differently.

Notwithstanding mawk and gawk -M, other awks do treat division by zero as a 
fatal error and, like gawk, have for years.

I rely on that behavior.  Perhaps others do, also.

Inasmuch as there are several trivial workarounds available to the OP, I hope 
his or her proposed change will not be incorporated into gawk as default 

reply via email to

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