To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 4216
4215  |  4217
Subject: 
Re: IC Floating Point Bug
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Tue, 28 Jul 1998 17:48:16 GMT
Original-From: 
Will <willbain@cs.umt.ANTISPAMedu>
Reply-To: 
willbain@cs.[Spamcake]umt.edu
Viewed: 
1118 times
  
Rick Moll wrote:
I've been making use of floating point for the first time on the HB
and am having problems.
<snip>

I get the same results with version 3.2.  Curiously, if I remove the
last digit in the a = 1.570796 statement (or replace it with a zero),
then I get the correct answer.  I guess it has something to do with
specifying too many significant digits in a floating point literal.
Very strange.

--Will
                                          , ,
        __@_/             \_@__           |/
          |                /__,           o             @_/
          )\              )              ( \            (\/\\,
~~~~~~~~~ ' ` ~~~~~~~~~~~ ` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wendy Parson,                        Every improvement in communication
Will Bain,                                makes the bore more terrible.
& Tatoosh                                           --Frank Moore Colby



Message has 1 Reply:
  Re: IC Floating Point Bug
 
(...) If you notice, the constant is PI/2. If you add more significant digits you can even get "a/b" to become 0.5, that is twice the correct answer rather than half of it!!! The reason the bug concerns me so much is that since "a" and "b" print out (...) (26 years ago, 28-Jul-98, to lugnet.robotics.handyboard)

Message is in Reply To:
  IC Floating Point Bug
 
I've been making use of floating point for the first time on the HB and am having problems. The following program demonstrates the kinds of bugs I've been encountering: ----(cut here)---...--- int main() { float a; float b; float c; /* This program (...) (26 years ago, 27-Jul-98, to lugnet.robotics.handyboard)

5 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR