bugGNU Scientific Library - Bugs: bug #42256, gsl_isnan in sys/test.c

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #42256: gsl_isnan in sys/test.c

Submitted by:  Patrick Alken <psa>
Submitted on:  Thu 01 May 2014 03:10:44 PM UTC  
 
Category: Runtime errorSeverity: 3 - Normal
Operating System: Status: Fixed
Assigned to: NoneOpen/Closed: Closed
Release: 

Thu 01 May 2014 03:12:01 PM UTC, comment #1:

According to the man page for isnan:

isnan(x) returns a non-zero value if (fpclassify(x) == FP_NAN)

so -1 is a valid return value for the function.

Fixed in git commit e970fcdd8e2553dc81a916ae8926feb44cbd26f3

Patrick Alken <psa>
Project Administrator
Thu 01 May 2014 03:10:44 PM UTC, original submission:

Hi,

I have this test failure in gsl-1.16 - using a mingw64 port of gcc-4.8.2
(x64):

###########################
==================================
gsl 1.16: sys/test-suite.log
==================================

# TOTAL: 1
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test
==========

FAIL: gsl_isnan(nan) (-1 observed vs 1 expected) [310]
###########################

This failure occurs because math.h's isnan() has returned "-1" instead of
the expected "1".
However, I believe (perhaps mistakenly) that this gsl test should be testing
for "true" not "1".

Interestingly, isnan() on the other mingw64 compilers I have at my disposal
does return "1" for a nan.
(And these other compilers include a 32-bit version of gcc-4.8.2 from the
same vendor.)

Cheers,
Rob

Patrick Alken <psa>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psa (Submitted the item)
  •  

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

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 01 May 2014 03:12:01 PM UTCpsaStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1