www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/01/14/10:48:04

Date: Thu, 14 Jan 1999 10:48:00 -0500
Message-Id: <199901141548.KAA06948@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <Pine.SUN.3.91.990114152852.23744B-100000@is> (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: <Pine DOT SUN DOT 3 DOT 91 DOT 990114152852 DOT 23744B-100000 AT is>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019