9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: dhog@plan9.cs.su.oz.au dhog@plan9.cs.su.oz.au
Subject: alef fp bug on 386
Date: Sat, 28 Oct 1995 06:40:54 -0400	[thread overview]
Message-ID: <19951028104054.c85-aIUQKgaQYzw6B5AuKDYlf_6tgaYd328qWmbm6zI@z> (raw)

The following alef program prints the wrong answer on a 386 architecture
machine (actually a pentium...).

----------------
#include <alef.h>

void
main()
{
	float x, y;

	x = 3.0;
	y = 5.0;
	if (x > y)
		print("%f > %f\n", x, y);
	else
		print("%f <= %f\n", x, y);
}
----------------
Here's the output on a pentium:

	term% 8.out
	3.000000 > 5.000000

and on a mips:

	cpu% v.out
	3.000000 <= 5.000000

(that's more like it!).  Does anyone know why?






             reply	other threads:[~1995-10-28 10:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-10-28 10:40 dhog [this message]
1995-10-28 13:25 G.David
1995-10-28 16:32 philw

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=19951028104054.c85-aIUQKgaQYzw6B5AuKDYlf_6tgaYd328qWmbm6zI@z \
    --to=dhog@plan9.cs.su.oz.au \
    /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).