MDL-9643 removing the sample files, use our unit tests instead

This commit is contained in:
skodak 2007-05-25 06:54:48 +00:00
parent ffaa6c4abd
commit 8bbb7e471e
3 changed files with 1 additions and 68 deletions

View File

@ -1,37 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>Example use of EvalMath</title>
</head>
<body>
<form method="post" action="">
y(x) = <input type="text" name="function" value="ln(100-99/(1+e^-(3x)))">
<input type="submit">
</form>
<table border="1">
<tr><th>x</th><th>y(x)</th>
<tr><td>-2</td><td>4.6027192880649</td></tr>
<tr><td>-1.8</td><td>4.6007089389783</td></tr>
<tr><td>-1.6</td><td>4.5970564127341</td></tr>
<tr><td>-1.4</td><td>4.5904358758421</td></tr>
<tr><td>-1.2</td><td>4.5784862928819</td></tr>
<tr><td>-1</td><td>4.5570805812015</td></tr>
<tr><td>-0.8</td><td>4.5192408021284</td></tr>
<tr><td>-0.6</td><td>4.4538441996618</td></tr>
<tr><td>-0.4</td><td>4.3448951339589</td></tr>
<tr><td>-0.2</td><td>4.1731553470264</td></tr>
<tr><td>0</td><td>3.9219733362813</td></tr>
<tr><td>0.2</td><td>3.5857394070469</td></tr>
<tr><td>0.4</td><td>3.1745496325453</td></tr>
<tr><td>0.6</td><td>2.7109297462397</td></tr>
<tr><td>0.8</td><td>2.2229028235855</td></tr>
<tr><td>1</td><td>1.7396169449748</td></tr>
<tr><td>1.2</td><td>1.2900869290353</td></tr>
<tr><td>1.4</td><td>0.90122953436788</td></tr>
<tr><td>1.6</td><td>0.59227355272826</td></tr>
<tr><td>1.8</td><td>0.36820000460355</td></tr>
<tr><td>2</td><td>0.21896659396653</td></tr>
</table>
</body>
</html>

View File

@ -1,31 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>Example use of EvalMath</title>
</head>
<body>
<form method="post" action="<?=$_SERVER['PHP_SELF']?>">
y(x) = <input type="text" name="function" value="<?=(isset($_POST['function']) ? htmlspecialchars($_POST['function']) : '')?>">
<input type="submit">
</form>
<?
if (isset($_POST['function']) and $_POST['function']) {
include('evalmath.class.php');
$m = new EvalMath;
$m->suppress_errors = true;
if ($m->evaluate('y(x) = ' . $_POST['function'])) {
print "\t<table border=\"1\">\n";
print "\t\t<tr><th>x</th><th>y(x)</th>\n";
for ($x = -2; $x <= 2; $x+=.2) {
$x = round($x, 2);
print "\t\t<tr><td>$x</td><td>" . $m->e("y($x)") . "</td></tr>\n";
}
print "\t</table>\n";
} else {
print "\t<p>Could not evaluate function: " . $m->last_error . "</p>\n";
}
}
?>
</body>
</html>

View File

@ -4,6 +4,7 @@ Our changes:
* implicit multiplication not allowed
* new custom calc emulation functions
* removed e and pi constants - not use din calc
* removed sample files
To see all changes diff against version 1.1