note 34439 deleted from function.sqrt by didou

From: Date: Sun, 27 Jul 2003 16:00:58 +0000
Subject: note 34439 deleted from function.sqrt by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-52745@lists.php.net to get a copy of this message
Note Submitter: Merve ---- Square roots of negative numbers exist, but they're imaginary numbers. Here's what I mean: <?php if ($b<0) { $c = sqrt($b*-1); print (" The square root of $b &#61; &plusmn;$c<i>i</i>"); } else { $c = sqrt($b); print (" The square root of $b &#61; $c"); } ?> So you can do square roots with negative numbers.

« previous php.notes (#52745) next »