do not try to display a tab that was not built

This commit is contained in:
Marc Delisle
2009-08-22 11:22:50 +00:00
parent 869571ee16
commit 15441ded5d
233 changed files with 76811 additions and 2473 deletions

View File

@@ -0,0 +1,40 @@
<?php
/**
* @package JAMA
*
* Pythagorean Theorem:
*
* a = 3
* b = 4
* r = sqrt(square(a) + square(b))
* r = 5
*
* r = sqrt(a^2 + b^2) without under/overflow.
*/
function hypo($a, $b) {
if (abs($a) > abs($b)) {
$r = $b/$a;
$r = abs($a)* sqrt(1+$r*$r);
} else if ($b != 0) {
$r = $a/$b;
$r = abs($b)*sqrt(1+$r*$r);
} else
$r = 0.0;
return $r;
}
/**
* Mike Bommarito's version.
* Compute n-dimensional hyotheneuse.
*
function hypot() {
$s = 0;
foreach (func_get_args() as $d) {
if (is_numeric($d))
$s += pow($d, 2);
else
trigger_error(ArgumentTypeException, ERROR);
}
return sqrt($s);
}
*/