bugAVR C Runtime Library - Bugs: bug #1929, -Inf not detected

 
 

bug #1929: -Inf not detected

Submitted by:  Joerg Wunsch <joerg_wunsch>
Submitted on:  Sun 08 Dec 2002 11:00:52 PM 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.

 

(Jump to the original submission Jump to the original submission)

Wed 21 Mar 2007 01:31:08 PM UTC, comment #8:

Fixed in CVS MAIN branch. The patch is implemented.

Dmitry Xmelkov <dmix>
Project AdministratorIn charge of this item.
Mon 01 May 2006 09:18:31 PM UTC, comment #7:

20060501: convertion 'long_long <--> float' is added.
Patch to avr-libc-1.4.4: operations with 'devtools' are not needed more.

Dmitry Xmelkov <dmix>
Project AdministratorIn charge of this item.
Sun 05 Mar 2006 10:25:51 PM UTC, comment #6:

20060305: a few of new functions (C99)

Dmitry Xmelkov <dmix>
Project AdministratorIn charge of this item.
Sat 25 Feb 2006 10:35:27 PM UTC, comment #5:

fplib-20060225: small inprovements

Dmitry Xmelkov <dmix>
Project AdministratorIn charge of this item.
Fri 24 Feb 2006 12:34:56 AM UTC, comment #4:

To try the patch to avr-libc-1.4.3:
- untar a 'avr-libc-1.4.3' tarball
- apply the patch
- make exutable: chmod a+x devtools/gen-avr-lib-tree.sh
- ./bootstrap
Below all is standart:
- ./configure ...
- make && make install

Dmitry Xmelkov <dmix>
Project AdministratorIn charge of this item.
Fri 24 Feb 2006 12:27:53 AM UTC, comment #3:

fplib-20060224: one error fixed, a bit of accuracy improvements.
Test list is expanded.

Dmitry Xmelkov <dmix>
Project AdministratorIn charge of this item.
Mon 20 Feb 2006 10:47:29 PM UTC, comment #2:

'fplib' is changed a little to power on IEEE 754 features.
Last acceleration by Peeter Vois (mulsf3) and numerous
improvements by Anatoly Sokolov are included also.
Try it by running a 'tst-all.sh' in tst/table directory.

Dmitry Xmelkov <dmix>
Project AdministratorIn charge of this item.
Sun 05 Jun 2005 10:29:49 AM UTC, comment #1:

No this bug in gcc-4.0.0/avrlibc-1.2.3.
Test case work fine with all compare operation ( <, >, =>, <=).

volatile float foo;
volatile int res;

int
main (void)
{
foo = 3.402823466E+38;
foo = (foo * foo); /* foo = +Inf */

if(foo < 0.0)
{
res = -1;
} else {
res = 1;
}

foo = - foo; /* foo = -Inf */

if(foo < 0.0)
{
res = -1;
} else {
res = 1;
}

return (0);
}

Anatoly Sokolov <aesok>
Project Administrator
Sun 08 Dec 2002 11:00:52 PM UTC, original submission:

When doing a floating point comparision, -Inf is not
detected properly as a negative number.

I. e.,

if (a < 0.0) { ... }

will not execute the code in { ... } if a is equal -Inf.

Joerg Wunsch <joerg_wunsch>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #11557:  avr-libc-1.4.5-20061219.diff.bz2 added by dmix (54KiB - application/x-bzip2 - Patch to avr-libc-1.4.4)
file #9870:  avr-libc-1.4.4-20060501.diff.bz2 added by dmix (54KiB - application/x-bzip2)
file #9869:  fplib-20060501.tar.bz2 added by dmix (398KiB - application/x-tbz)
file #1584:  avr-libc-1.4.3-20060305.diff.bz2 added by dmix (58KiB - application/x-bzip2)
file #1623:  fplib-20060305.tar.bz2 added by dmix (377KiB - application/x-tbz)
file #1826:  fplib-20060225.tar.bz2 added by dmix (311KiB - application/x-tbz)
file #1830:  avr-libc-1.4.3-20060225.diff.bz2 added by dmix (56KiB - application/x-bzip2)
file #1828:  avr-libc-1.4.3-20060224.diff.bz2 added by dmix (55KiB - application/x-bzip2 - Patch to avr-libc-1.4.3)
file #1860:  fplib-20060224.tar.bz2 added by dmix (310KiB - application/x-tbz)
file #1907:  fplib-20060220.tar.bz2 added by dmix (251KiB - application/x-tbz - Preliminary version.)
file #3041:  inf-cmp-test.c added by aesok (340B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

     

     

    Follow 16 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 18 Dec 2007 09:38:36 PM UTCjoerg_wunschStatusNone=>Fixed
      Assigned toNone=>dmix
      Open/ClosedOpen=>Closed
    Mon 08 Jan 2007 01:00:27 PM UTCjoerg_wunschItem GroupNone=>libm code
    Tue 19 Dec 2006 08:52:02 AM UTCdmixAttached File-=>Added avr-libc-1.4.5-20061219.diff.bz2, #11557
    Mon 01 May 2006 09:19:43 PM UTCdmixAttached File-=>Added avr-libc-1.4.4-20060501.diff.bz2, #9870
    Mon 01 May 2006 09:18:32 PM UTCdmixAttached File-=>Added fplib-20060501.tar.bz2, #9869
    Sun 05 Mar 2006 10:26:32 PM UTCdmixAttached File-=>Added avr-libc-1.4.3-20060305.diff.bz2, #3473
    Sun 05 Mar 2006 10:25:51 PM UTCdmixAttached File-=>Added fplib-20060305.tar.bz2, #3472
    Sat 25 Feb 2006 10:36:22 PM UTCdmixAttached File-=>Added fplib-20060225.tar.bz2, #3440
    Sat 25 Feb 2006 10:35:27 PM UTCdmixAttached File-=>Added avr-libc-1.4.3-20060225.diff.bz2, #3439
    Fri 24 Feb 2006 12:34:56 AM UTCdmixAttached File-=>Added avr-libc-1.4.3-20060224.diff.bz2, #3437
    Fri 24 Feb 2006 12:27:53 AM UTCdmixAttached File-=>Added fplib-20060224.tar.bz2, #3436
    Mon 20 Feb 2006 10:47:29 PM UTCdmixAttached File-=>Added fplib-20060220.tar.bz2, #3427
    Sun 05 Jun 2005 10:29:49 AM UTCaesokAttached File-=>Added inf-cmp-test.c, #2575
    Mon 18 Oct 2004 05:21:16 PM UTCarcanumCategoryNone=>Library

    Back to the top


    Powered by Savane 3.1-cleanup1