#23261 [Opn->Bgs]: $f[$i][0] = 2.95*COS((4*3.1415+i*(4*3.1415)/$n));

From: Date: Thu, 17 Apr 2003 17:15:12 +0000
Subject: #23261 [Opn->Bgs]: $f[$i][0] = 2.95*COS((4*3.1415+i*(4*3.1415)/$n));
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37820@lists.php.net to get a copy of this message
ID: 23261 Updated by: jay@php.net Reported By: nicolae79 at oneup dot ro -Status: Open +Status: Bogus Bug Type: Math related Operating System: WINDOWS 2000 PHP Version: 4.3.2RC1 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. This isn't a bug, your logic is wrong. Look at your for-loop. In the conditional section ($i = $n), you're doing an assignment instead of checking for a condition. J Previous Comments: ------------------------------------------------------------------------ [2003-04-17 12:05:58] nicolae79 at oneup dot ro Fatal error: Maximum execution time of 320 seconds exceeded in c:\program files\apache group\apache\htdocs\spiral.php on line 51 the problem is that ...I want to use these functions and I do not know Why it thake so long to calculate just the first line,...And what to say about the hole code... IT can be possible to run this unde PHP Apache server? unde Pascal it work fine... Thanks,.. I hope somebody can help me... //------------------------------------------------------------- for($i = 1;$i = $n; $i++) { $a[$i][0] = 3.2*COS((4*3.1415+$i*(4*3.1415)/$n)); $a[$i][2] = 3.2*SIN((4*3.1415+$i*(4*3.1415)/$n)); $a[$i][1] = (0.25+$i/5); } //-------------------------------------------------------------- for($i = 1;$i = $n; $i++) { $b[$i][0] = 3.2*COS((4*3.1415+$i*(4*3.1415)/$n)); $b[$i][2] = 3.2*SIN((4*3.1415+$i*(4*3.1415)/$n)); $b[$i][1] = ($i/5); } //-------------------------------------------------------------- for($i = 1;$i = $n; $i++) { $c[$i][0] = 0.1*COS((4*3.1415+$i*(4*3.1415)/$n)); $c[$i][2] = 0.1*SIN((4*3.1415+$i*(4*3.1415)/$n)); $c[$i][1] = (0.25+$i/5); } //-------------------------------------------------------------- for($i = 1;$i = $n; $i++) { $d[$i][0] = 2.95*COS((4*3.1415+$i*(4*3.1415)/$n)); $d[$i][2] = 2.95*SIN((4*3.1415+$i*(4*3.1415)/$n)); $d[$i][1] = (0.25+$i/5); } //-------------------------------------------------------------- for($i = 1;$i = $n; $i++) { $e[$i][0] = 2.95*COS((4*3.1415+$i*(4*3.1415)/$n)); $e[$i][2] = 2.95*SIN((4*3.1415+$i*(4*3.1415)/$n)); $e[$i][1] = (0.25+$i/5); } //-------------------------------------------------------------- for($i = 1;$i = $n; $i++) { $f[$i][0] = 2.95*COS((4*3.1415+i*(4*3.1415)/$n)); $f[$i][2] = 2.95*SIN((4*3.1415+i*(4*3.1415)/$n)); $f[$i][1] = (0.25+$i/5); } //-------------------------------------------------------------- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23261&edit=1

« previous php.bugs (#37820) next »