summaryrefslogtreecommitdiff
path: root/matheunit.pas
diff options
context:
space:
mode:
Diffstat (limited to 'matheunit.pas')
-rw-r--r--matheunit.pas12
1 files changed, 12 insertions, 0 deletions
diff --git a/matheunit.pas b/matheunit.pas
index dd3517c..a5163c8 100644
--- a/matheunit.pas
+++ b/matheunit.pas
@@ -64,6 +64,7 @@ function formelnAuswerten(s: string; kvs: tKnownValues; cbgv: tCallBackGetValue)
function knownValue(nam: string; val: extended): tKnownValue;
function berechneEinheitsZelle(invarianz,modulus: tInt64Point): tInt64Point;
function ggT(a,b: int64): int64;
+function intRoot(n: int64): int64;
function ermittleAnstieg(dat: string; xSpalte,ySpalte: longestOrdinal): extended;
function ermittleMittelwert(dat: string; werteSpalte,gewichteSpalte: longestOrdinal): extended;
procedure sortiereNachWert(var maxima: tLongintArray; werte: tExtendedArray; logarithmischesPivot: boolean);
@@ -998,6 +999,17 @@ begin // a <= b
result:=b;
end;
+function intRoot(n: int64): int64;
+begin
+ if n<=0 then begin
+ result:=0;
+ exit;
+ end;
+ result:=floor(sqrt(n));
+ while n mod result > 0 do
+ dec(result);
+end;
+
function ermittleAnstieg(dat: string; xSpalte,ySpalte: longestOrdinal): extended;
var
f: textFile;