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:  Library Severity:  3 - Normal
Priority:  5 - Normal Item Group:  libm code
Status:  Fixed Assigned to:  Dmitry Xmelkov <dmix>
Percent Complete:  0% Open/Closed:  Closed
Release:  None Fixed 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.


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

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


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 Files:

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
  • -email is unavailable- added by dmix (Posted a comment)
  • -email is unavailable- added by joerg_wunsch (Updated the item)



    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-12-18 joerg_wunsch StatusNone => Fixed
        Assigned toNone => dmix
        Open/ClosedOpen => Closed
    2007-01-08 joerg_wunsch Item GroupNone => libm code
    2005-01-07 None Attached File- => Added main.c, #2039

    Back to the top

    Powered by Savane 3.5