public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikita Danilov <Nikita@Namesys.COM>
To: Andrey Ulanov <drey@rt.mipt.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: FPU, i386
Date: Wed, 17 Apr 2002 18:29:00 +0400	[thread overview]
Message-ID: <15549.34476.64714.868489@laputa.namesys.com> (raw)
In-Reply-To: <20020417140510.GB9930@gleam.rt.mipt.ru>

Andrey Ulanov writes:
 > Look at this:
 > 
 > $ cat test.c
 > #include <stdio.h>
 > 
 > main()
 > {
 > 	double h = 0.2;
 > 	
 > 	if(1/h == 5.0)
 > 	    printf("1/h == 5.0\n");
 > 
 > 	if(1/h < 5.0)
 > 	    printf("1/h < 5.0\n");
 > 	return 0;
 > }
 > $ gcc test.c

$ gcc -O test.c
$ ./a.out
1/h == 5.0

without -O, gcc initializes h to 0.2000000000000000111

 > $ ./a.out
 > 1/h < 5.0
 > $ 
 > 
 > I also ran same a.out under FreeBSD. It says "1/h == 5.0".
 > It seems there is difference somewhere in FPU 
 > initialization code. And I think it should be fixed.
 > 
 > ps. cc to me
 > -- 
 > with best regards, Andrey Ulanov.
 > drey@rt.mipt.ru

  parent reply	other threads:[~2002-04-17 14:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-17 14:05 FPU, i386 Andrey Ulanov
2002-04-17 14:20 ` Mike Black
2002-04-17 14:26 ` Richard B. Johnson
2002-04-17 14:29 ` Nikita Danilov [this message]
2002-04-17 15:20 ` Gunther Mayer
  -- strict thread matches above, loose matches on Subject: below --
2002-04-17 14:40 Jesse Pollard
2002-04-17 14:49 ` John Alvord
2002-04-18  8:31 ` Jakob Østergaard
2002-04-25 13:09 ` rpm
2002-04-25 13:22   ` Andreas Schwab
2002-04-25 14:22   ` Richard B. Johnson
2002-04-25 15:24     ` Mark Mielke
2002-04-25 16:08       ` Richard B. Johnson
2002-04-25 14:38 Nicholas Berry
     [not found] <scc7dcc8.053@mail-02.med.umich.edu>
2002-04-25 14:52 ` Richard B. Johnson
2002-04-26 22:10 Kerl, John
2002-04-29 12:33 ` Richard B. Johnson
2002-04-29 16:19 Kerl, John

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=15549.34476.64714.868489@laputa.namesys.com \
    --to=nikita@namesys.com \
    --cc=drey@rt.mipt.ru \
    --cc=linux-kernel@vger.kernel.org \
    /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