Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

テストです!first commit #22

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions calc/post1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>
ポストデータ
</title>
</head>
<body>
<form method="POST" action="post2.php">
人数:
<input type="number" name="name" size="50"/>
<input type="submit" value="人数"/>
</form>
</body>
</html>
94 changes: 94 additions & 0 deletions calc/post2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<html>
<head>
<title>ポストデータ</title>
</head>
<body>
計算した人数は、<?php print $_POST['name']; ?>
<br/>
</body>
</html>

<?php
$rank =$_POST['name'];
print "計算する速度を計算する";
print "何回計算するか? 16個の数字を計算";
print "<br>";
if($rank ==1){
print $rank/1;
}elseif ($rank ==2){
print $rank/1+$rank/2;
}elseif ($rank ==4) {
print $rank/1+$rank/2+$rank/4;
}elseif ($rank ==8) {
print $rank/1+$rank/2+$rank/4+$rank/8;
}elseif ($rank == 16) {
print $rank/1+$rank/2+$rank/4+$rank/8+$rank/16;
}
print "<br>";
print "回計算する";
print "速度向上率は";
print "<br>";
if($rank ==1){
print $rank/1;
}elseif($rank ==2){
print ($rank/1+$rank/2)/2;
}elseif($rank ==4) {
print ($rank/1+$rank/2+$rank/4)/3;
}elseif ($rank ==8) {
print( $rank/1+$rank/2+$rank/4+$rank/8)/4;
}elseif($rank ==16){
print ($rank/1+$rank/2+$rank/4+$rank/8+$rank/16)/5;
}
print "<br>";





/* print define_syslog_variables();
openlog('$rank', '2', LOG_PID | LOG_PERROR, LOG_LOCAL0);
syslog(LOG_INFO, 'message');
closelog();
*/

//define($base,'name' );
//log2($base);

/*function getLog ($base){
return log2($base);
}
$name = 'getLog';
$Area=$rank;
print getLog;
*/
//p.192 check

print "<br>";

print "何枚計算しても使えるようにしたい";
print "そうすると並列化数を求める";
print "<br>";
log ($rank,2);
// print"乗すると"+$rank+"になる";

print "<br>";

print log ($rank,2)+1 ;
$number = log ($rank,2)+1;

print "<br>";

//$numberの説明

?>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要な改行は削除してください。