bugAVR C Runtime Library - Bugs: bug #11511, NaN not generated correctly by...

 
 

bug #11511: NaN not generated correctly by division library

Submitted by:  Colin O Flynn <c_oflynn>
Submitted on:  Fri 07 Jan 2005 12:02:12 AM UTC  
 
Category: LibrarySeverity: 3 - Normal
Priority: 5 - NormalItem Group: libm code
Status: FixedPercent Complete: 0%
Assigned to: Dmitry Xmelkov <dmix>Open/Closed: Closed
Release: NoneFixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 21 Mar 2007 01:29:09 PM UTC, comment #3:

Fixed in CVS MAIN branch.

Dmitry Xmelkov <dmix>
Project AdministratorIn charge of this item.
Fri 07 Jan 2005 08:19:22 PM UTC, comment #2:

I've added the test file - uses both printf and isnan to determine what the number is, as well as printing the actual value.

Runs on Mega128 at 3.68 MHz (ie: STK500 max), easily adapted to any device.

-Colin

Anonymous
Fri 07 Jan 2005 07:28:51 PM UTC, comment #1:

Colin, would you be willing to attach a test case to this bug?

Thanks
Eric

Eric Weddington <arcanum>
Project Administrator
Fri 07 Jan 2005 12:02:12 AM UTC, original submission:

It seems NaN is not generated correctly when you divide by 0 as it should be. The code is present in the division routine. As well if you set a floating point variable to nan when using a printf() on this number it prints as "nan".

A check of the division routine shows the test for zero occuring as not true when the number is clearly zero, using avarice.

Colin O Flynn <c_oflynn>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #2338:  main.c added by None (732B - text/x-csrc - main.c - test 0/0 division, showing how it results in 2)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dmix (Posted a comment)
  • -unavailable- added by joerg_wunsch (Updated the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 18 Dec 2007 09:39:14 PM UTCjoerg_wunschStatusNone=>Fixed
      Assigned toNone=>dmix
      Open/ClosedOpen=>Closed
    Mon 08 Jan 2007 01:00:07 PM UTCjoerg_wunschItem GroupNone=>libm code
    Fri 07 Jan 2005 07:36:16 PM UTCNoneAttached File-=>Added main.c, #2039

    Back to the top


    Powered by Savane 3.1-cleanup1