9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* alef fp bug on 386
@ 1995-10-28 13:25 G.David
  0 siblings, 0 replies; 3+ messages in thread
From: G.David @ 1995-10-28 13:25 UTC (permalink / raw)


>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?

And just in case you think it may have something to do with
a pentium, it also does it on an intel 486..






^ permalink raw reply	[flat|nested] 3+ messages in thread

* alef fp bug on 386
@ 1995-10-28 16:32 philw
  0 siblings, 0 replies; 3+ messages in thread
From: philw @ 1995-10-28 16:32 UTC (permalink / raw)


Compiler bug. This fixes it:

philw-thresher% diff inst.c /n/bootes/sys/src/alef/8
498c498
< 		a = AFCOMD;
---
> 		a = AFCOMF;
502c502
< 		a = AFCOMDP;
---
> 		a = AFCOMFP;

phil






^ permalink raw reply	[flat|nested] 3+ messages in thread

* alef fp bug on 386
@ 1995-10-28 10:40 dhog
  0 siblings, 0 replies; 3+ messages in thread
From: dhog @ 1995-10-28 10:40 UTC (permalink / 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?






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1995-10-28 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-10-28 13:25 alef fp bug on 386 G.David
  -- strict thread matches above, loose matches on Subject: below --
1995-10-28 16:32 philw
1995-10-28 10:40 dhog

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).