From: Aleksej Saushev <asau@hotbox.ru>
To: Tommy Nordgren <tommy.nordgren@comhem.se>
Cc: Brian Gough <bjg@network-theory.co.uk>, gsl-discuss@sourceware.org
Subject: Re: test release gsl-1.9.90.tar.gz
Date: Thu, 13 Sep 2007 08:12:00 -0000 [thread overview]
Message-ID: <87abrryotz.fsf@hotbox.ru> (raw)
In-Reply-To: <682A4679-3C95-4DE0-AC92-BF1B57A241B2@comhem.se> (Tommy Nordgren's message of "Wed\, 12 Sep 2007 23\:01\:41 +0200")
Tommy Nordgren <tommy.nordgren@comhem.se> writes:
>> FAIL: gsl_isinf(-inf) (1 observed vs -1 expected) [112]
>> FAIL: test
> The following alternate patch will fix the test failure,
> without modifying the test cases.
> --- /Users/emac/Desktop/infnan.c 2007-09-12
> 22:37:19.000000000 +0200
> +++ /Softsys/gsl-1.9.90/sys/infnan.c 2007-09-12
> 22:44:30.000000000 +0200
> @@ -118,7 +118,11 @@
> int
> gsl_isinf (const double x)
> {
> - return isinf(x);
> + int result = isinf(x);
> + if (result > 0 && x < 0) {
> + result = - result;
> + }
> + return result;
> }
> # else
> Note: the one on the desktop is the unmodified file.
> Also, with make -k check all other test cases pass.
As for me, I don't like the proposal.
It is clear, that the test case is wrong, since in C truth is
denoted by "1", and not by "-1". This is more convenient from
scientist's point of view too.
If you really want to fix test code, you'd better make it deal
with standard semantic:
The isinf() macro returns a non-zero value if the value of x
is an infinity. Otherwise 0 is returned.
Obviously, test code doesn't behave well, when isinf returns
12345 as its value.
next prev parent reply other threads:[~2007-09-13 8:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-11 9:19 Brian Gough
2007-09-11 18:39 ` Patrick Alken
2007-09-12 17:04 ` Brian Gough
2007-09-13 13:45 ` Brian Gough
2007-09-13 16:30 ` Patrick Alken
2007-09-13 19:34 ` Brian Gough
2007-09-12 8:21 ` Aleksej Saushev
2007-09-12 8:48 ` Brian Gough
2007-09-12 20:12 ` Jari Häkkinen
2007-09-12 21:02 ` Tommy Nordgren
2007-09-12 21:03 ` Tommy Nordgren
2007-09-13 8:12 ` Aleksej Saushev [this message]
2007-09-13 9:42 ` Tommy Nordgren
2007-09-12 21:16 ` Oliver Jennrich
2007-09-13 12:42 ` Brian Gough
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87abrryotz.fsf@hotbox.ru \
--to=asau@hotbox.ru \
--cc=bjg@network-theory.co.uk \
--cc=gsl-discuss@sourceware.org \
--cc=tommy.nordgren@comhem.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).