9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@coraid.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] NaN(2)
Date: Tue, 20 Feb 2007 23:18:22 -0500	[thread overview]
Message-ID: <27e3bf985088cc336551b41938a01f8b@coraid.com> (raw)
In-Reply-To: <bf1c89a1c72ddd7baa5886c338bb32be@plan9.jp>

after a bit of actual thought, i think that NaN
is supposed to generate a note.  if you do catch
the note, the program should work fine.

e.g.

#include <u.h>
#include <libc.h>

void
note(void *, char *s)
{
	if(strncmp(s, "sys: fp: ", 8) == 0)
		noted(NCONT);
	noted(NDFLT);
}

void
main(void)
{
	double d;

	notify(note);
	d = NaN();
	print("%g\n", d);
}


  reply	other threads:[~2007-02-21  4:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-20 23:55 Joel Salomon
2007-02-21  0:00 ` Joel C. Salomon
2007-02-21  0:20   ` Joel Salomon
2007-02-21  1:00     ` erik quanstrom
2007-02-21  2:26       ` Joel Salomon
2007-02-21  4:18         ` erik quanstrom [this message]
2007-02-21  4:35           ` Joel C. Salomon
2007-02-21  5:10           ` Joel C. Salomon
2007-02-21  5:50 ` Russ Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=27e3bf985088cc336551b41938a01f8b@coraid.com \
    --to=quanstro@coraid.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).