Mail Archives: djgpp-workers/1999/01/14/12:15:00
On 14 Jan 99, at 15:45, Eli Zaretskii wrote:
> So please try the following two Awk commands on as many Unix/Linux
> platforms as you can gain access and tell me what do they print:
>
> awk 'BEGIN { print log(0), log(-1), log(100) }'
> awk 'BEGIN { print exp(0), exp(1000000), exp(0.5) }'
>
> If Gawk is installed on the target system, try Gawk; if not, try Awk.
>
Results on RS6000 (system AIX-4.3) with both GNU AWK and native AWK
$ gawk --version
GNU Awk 3.0.3
Copyright (C) 1989, 1991-1997 Free Software Foundation.
$
$ gawk 'BEGIN { print log(0), log(-1), log(100) }'
gawk: cmd. line:1: warning: log called with negative argument -1
-INF NaNQ 4.60517
$ gawk 'BEGIN { print exp(0), exp(1000000), exp(0.5) }'
gawk: cmd. line:1: warning: exp argument 1e+06 is out of range
1 INF 1.64872
$ awk
Usage: awk [-F Character][-v Variable=Value][-f File|Commands][Variable=Value|F]
$ awk 'BEGIN { print log(0), log(-1), log(100) }'
-INF awk: 0602-544 The log parameter to a math library function is not in the d.
The source line number is 1.
1 4.60517
$ awk 'BEGIN {print log(0), log(-1), log(100) }' 2>/dev/null
-INF 1 4.60517
$ awk 'BEGIN { print exp(0), exp(1000000), exp(0.5) }'
1 awk: 0602-545 The exp return value of a math library function is out of range.
The source line number is 1.
1 1.64872
$ awk 'BEGIN {print exp(0), exp(1000000), exp(0.5) }' 2>/dev/null
1 1 1.64872
$ uname -a
AIX ieva01 3 4 00000424A400
$
- Raw text -