Mail Archives: djgpp-workers/1999/01/14/10:39:16
Eli said:
> 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:
Solaris:
; uname -a
SunOS juno 5.4 Generic_101945-32 sun4m sparc
; awk 'BEGIN { print log(0), log(-1), log(100) }'
log: SING error
log: DOMAIN error
-3.40282e+38 -3.40282e+38 4.60517
; gawk 'BEGIN { print log(0), log(-1), log(100) }'
gawk: cmd. line:1: warning: log called with negative argument -1
-Inf -Inf 4.60517
; awk 'BEGIN { print exp(0), exp(1000000), exp(0.5) }'
1 3.40282e+38 1.64872
; 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
SunOS 4:
source 424 > uname -a
SunOS mimas 4.1.4 1 sun4m
source 425 > awk 'BEGIN { print log(0), log(-1), log(100) }'
log: SING error
log: DOMAIN error
-Inf NaN 4.60517
source 426 > awk 'BEGIN { print exp(0), exp(1000000), exp(0.5) }'
1 Inf 1.64872
Right,
MartinS
- Raw text -