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

Submitter:  Patrick Alken <psa>
Submitted:  Thu 01 May 2014 03:10:44 PM UTC
   
 
Category:  Runtime error Severity:  3 - Normal
Operating System:  Status:  Fixed
Assigned to:  None Open/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>
Group 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>
Group administrator

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-05-01 psa StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code