avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [bug #1929] -Inf not detected


From: Anatoly Sokolov
Subject: [avr-libc-dev] [bug #1929] -Inf not detected
Date: Sun, 5 Jun 2005 10:29:50 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)

Follow-up Comment #1, bug #1929 (project avr-libc):

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);
}

    _______________________________________________________

Additional Item Attachment:

File name: inf-cmp-test.c                 Size:0 KB

<http://savannah.nongnu.org/bugs/download.php?item_id=1929&item_file_id=2575>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=1929>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]