php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23261 $f[$i][0] = 2.95*COS((4*3.1415+i*(4*3.1415)/$n));
Submitted: 2003-04-17 12:05 UTC Modified: 2003-04-17 12:15 UTC
From: nicolae79 at oneup dot ro Assigned:
Status: Not a bug Package: Math related
PHP Version: 4.3.2RC1 OS: WINDOWS 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nicolae79 at oneup dot ro
New email:
PHP Version: OS:

 

 [2003-04-17 12:05 UTC] 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);

}

//--------------------------------------------------------------

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-17 12:15 UTC] jay@php.net
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 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 08 23:01:27 2024 UTC