Doc #61707 [Csd->Nab]: return value of sqrt() in documentation

From: Date: Fri, 13 Apr 2012 01:19:02 +0000
Subject: Doc #61707 [Csd->Nab]: return value of sqrt() in documentation
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8249@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61707&edit=1 ID: 61707 Updated by: aharvey@php.net Reported by: legoduke at gmail dot com Summary: return value of sqrt() in documentation -Status: Closed +Status: Not a bug Type: Documentation Problem Package: Math related Operating System: Win XP PHP Version: 5.3.10 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2012-04-12 22:40:09] legoduke at gmail dot com delete it pls ------------------------------------------------------------------------ [2012-04-12 22:37:01] legoduke at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.sqrt#refsect1-function.sqrt-returnvalues --- Why didn't you say that sqrt() always return float, even if argument is, for example 4, 9, 16 Test script: --------------- if (is_int(sqrt(9))) { echo 'true'; } else { echo 'false'; } Expected result: ---------------- Expected value: true :) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61707&edit=1

« previous php.doc.bugs (#8249) next »