Doc #64801 [Opn->Csd]: gmp_testbit Return Values text inaccurate
Edit report at https://bugs.php.net/bug.php?id=64801&edit=1
ID: 64801
Updated by: philip@php.net
Reported by: phpbugs at personal dot formauri dot es
Summary: gmp_testbit Return Values text inaccurate
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: philip
Block user comment: N
Private report: N
New Comment:
This is now fixed in SVN, as per:
Revision: http://svn.php.net/viewvc/?view=revision&revision=330636
Log: Clarified return value as suggested in PHP Bug #64832
Thank you for the bug report. :)
Source: http://lxr.php.net/xref/PHP_5_4/ext/gmp/gmp.c#1511
Previous Comments:
------------------------------------------------------------------------
[2013-05-09 16:10:56] phpbugs at personal dot formauri dot es
Description:
------------
The Return Values of the gmp_testbit() function reads:
Returns TRUE on success or FALSE on failure.
Judging by the examples, that is incorrect. The function seems to return TRUE if the tested bit is
1, and FALSE if it is 0.
(It is a bit of a stretch to consider a failure for a number to have a bit set to zero in the given
position.)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64801&edit=1
Thread (2 messages)