From owner-freebsd-stable Mon Apr 10 12:48:34 2000 Delivered-To: freebsd-stable@freebsd.org Received: from rr.com (rdu25-22-143.nc.rr.com [24.25.22.143]) by hub.freebsd.org (Postfix) with ESMTP id ED59A37BB3E for ; Mon, 10 Apr 2000 12:48:28 -0700 (PDT) (envelope-from rhh@rr.com) Received: (from rhh@localhost) by rr.com (8.9.3/8.9.3) id PAA01680; Mon, 10 Apr 2000 15:48:41 -0400 (EDT) (envelope-from rhh) Date: Mon, 10 Apr 2000 15:48:40 -0400 From: Randall Hopper To: "Michael J. Ruhl" Cc: stable@freebsd.org Subject: Re: float-to-double core dump on 3.4R Message-ID: <20000410154840.A1508@ipass.net> References: <20000408193053.A3689@ipass.net> <38F2AD45.785F4B36@network-alchemy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <38F2AD45.785F4B36@network-alchemy.com>; from mruhl@network-alchemy.com on Mon, Apr 10, 2000 at 09:42:45PM -0700 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Michael J. Ruhl: |Are you getting a floating exception error? I would expect that |behavior. Yes. |You do f = FLT_MAX and then double it. The result is the Not a number |error. Then you try to put that error into another variable. The |program is doing the right thing. I do not get an exception when the Inf is generated. The exception occurs when I promote that Inf value to a higher-precision type which also has an Inf representation. How can this be right? This only makes sense if generating an Inf is not an exception condition, but promoting an Inf to a higher-precision type is. Is this the case? Thanks, Randall |Mike | |Randall Hopper wrote: |> |> #include |> |> main() |> { |> float f = FLT_MAX; |> double d; |> f = f * 2; |> d = f; |> } |> |> Delete the "d=f" line and it doesn't core. Put it in and it does |> (floating-point exception). |> |> >From this it appears there may be a bug in the float-to-double promotion |> when f is Inf (or, at least I'd expect that f is Inf). |> |> Any comments? If not, I'll file the PR. |> |> Thanks, |> |> Randall Hopper |> |> To Unsubscribe: send mail to majordomo@FreeBSD.org |> with "unsubscribe freebsd-stable" in the body of the message Content-Description: Card for Michael J. Ruhl |begin:vcard |n:Ruhl;Michael J. |tel;fax:(831) 460-3801 |tel;work:(831) 460-3800 ext. 3872 |x-mozilla-html:FALSE |url:http://www.employees.org/~mruhl |org:Network Alchemy;Quality Assurance |adr:;;1538 Pacific Ave;Santa Cruz;California;95060;U.S.A. |version:2.1 |email;internet:mruhl@network-alchemy.com |title:Senior QA Engineer |fn:Michael J. Ruhl |end:vcard To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message