[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
signbit() and other true/false functions
From: |
Michael D. Godfrey |
Subject: |
signbit() and other true/false functions |
Date: |
Sat, 09 Feb 2013 18:27:19 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
John,
I expect that you have seen bug #38291, which was my fault.
I used signbit(x) ==1 when I should have used signbit(x) !=0
But, is it generally true that the set of "truth-value" functions
return 0 for false and "anything else" for true?
It may seem a bit obsessive but I think it would be more
robust if the result were 0/1 and, of course, the same on
all platforms. I would still say that the documentation should
make clear that the appropriate test should be with respect to
0.
Anyhow, I admit that my use of == 1 was simply an error.
Sorry.
Michael
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- signbit() and other true/false functions,
Michael D. Godfrey <=