From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,a0149c61779a35a7 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,a0149c61779a35a7 X-Google-Attributes: gid1014db,public X-Google-Thread: fee84,a0149c61779a35a7 X-Google-Attributes: gidfee84,public From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya) Subject: Re: NaN in C/C++ on OSF1 Date: 1995/12/08 Message-ID: <4a9ovt$h9b@newshost.lanl.gov>#1/1 X-Deja-AN: 121364257 distribution: world references: <49mnlh$5a3@ratatosk.uio.no> <4a7lji$3j5@nntpd.lkg.dec.com> organization: Los Alamos National Laboratory keywords: NaN, OSF1 newsgroups: comp.unix.osf.osf1,comp.lang.c,comp.lang.c++ In article <4a7lji$3j5@nntpd.lkg.dec.com>, hobbs@steven.zko.dec.com (Steven Hobbs) writes: |> Therefore, if you use cc with -ieee_with_no_inexact then sqrt(-1.0) will return |> a quietNaN and arithmetic on quietNaNs will *not* generate a signal (unless you |> enable signaling--see the ieee(3) man page). For historical reasons, sqrt(-1.0) |> produces 0.0 when -ieee_with_no_inexact is not enabled. According to ANSI C, unless you do some implementation defined magic (like `enabling signals' etc.), sqrt(-1.0) must _not_ produce an exception. It can return any value defined by the implementation. Cheers Tanmoy -- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242) Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544 Others see , or. -- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]