Date: Thu, 14 Jan 1999 10:48:00 -0500 Message-Id: <199901141548.KAA06948@envy.delorie.com> From: DJ Delorie To: djgpp-workers AT delorie DOT com In-reply-to: (message from Eli Zaretskii on Thu, 14 Jan 1999 15:45:55 +0200 (IST)) Subject: Re: What should libm functions return for bad args References: Reply-To: djgpp-workers AT delorie DOT com > awk 'BEGIN { print log(0), log(-1), log(100) }' > awk 'BEGIN { print exp(0), exp(1000000), exp(0.5) }' Redhat 5.1: GNU Awk 3.0.3 $ awk 'BEGIN { print log(0), log(-1), log(100) }' awk: cmd. line:1: warning: log called with negative argument -1 -Inf NaN 4.60517 $ awk 'BEGIN { print exp(0), exp(1000000), exp(0.5) }' awk: cmd. line:1: warning: exp argument 1e+06 is out of range 1 Inf 1.64872 SGI IRIX 5.3: native awk $ awk 'BEGIN { print log(0), log(-1), log(100) }' -inf nan0x10000000 4.60517 $ awk 'BEGIN { print exp(0), exp(1000000), exp(0.5) }' 1 inf 1.64872