Autor Beitrag
Anisas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 29

Win XP Professional
Delphi 7
BeitragVerfasst: Do 16.11.06 17:43 
So .. wiedermal eine Frage:

Wie kann man denn die Wurzelfunktion schreiben? Ich komm einfach nicht dahinter :(

Hilfe wäre sehr nett :D

LG Anisas
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Do 16.11.06 17:47 
sqrt(); zieht die Quadratwurzel.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Chryzler
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1097
Erhaltene Danke: 2



BeitragVerfasst: Do 16.11.06 17:50 
Hier kommt meine Lösung:
:wink:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
function SquareRoot(X: Extended): Extended;
begin
  SquareRoot := Sqrt(X);
end;

Hast du schon mal nach Wurzelziehen hier gesucht? Ich bin mir sicher, da findest du was brauchbares. Du willst doch die Wurzel nicht mit Sqrt berechnen, sondern anderst oder?
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Do 16.11.06 17:52 
Um die 3. Wurzel zu ziehen, würde ich Power nehmen:
ausblenden Delphi-Quelltext
1:
X := Power(27, 1 / 3);					

Denn: 3 Wurzel aus 27 = 27 ^ (1 / 3)

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Do 16.11.06 18:01 
Kleiner Nachtrag zu user profile iconGTA-PLaces Kommentar:
Um Power benutzen zu können, musst du die Unit math miteinbinden ;)