Autor Beitrag
$veno
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 42



BeitragVerfasst: Fr 28.10.05 22:56 
Was heist diese Exception auf gut Deutsch?

Danke und Gruss Sven:)
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 28.10.05 23:03 
:gruebel:

Was willst du uns damit sagen... :?:

cu
Narses
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Fr 28.10.05 23:05 
das er keinen plan hat was die fehlermeldung von ihm will
exceotion: ausnahme
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 28.10.05 23:08 
Moin!

Von "ungültige Gleitkommaoperation" auf "du tust was mit einer Fließkommazahl, was du nicht tun darfst; schimpf, schimpf" zu kommen, kann doch nicht wirklich das Problem sein... :gruebel:

cu
Narses
$veno Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 42



BeitragVerfasst: Fr 28.10.05 23:29 
naja, habs einfach nicht verstanden.

Mir zeigt er diese Exception in dieser Zeile an:

ausblenden Delphi-Quelltext
1:
    IF l1[high(l1)] < l2[high(l2)] THEN					


l1 und l2 sind arrays vom typ extended. der l1[high(l1)] hat den wert 29,666666667 und l2[high(l2)] hat den wert 0.
Ich geh mal davon aus das es irgendwas mit der 0 zu tun hat denn der fehler tritt nur auf wenn l2[high(l2)] = 0 ist.
Was mache ich hier was ich nicht amchen darf mit dem typ extended?
Spaceguide
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Sa 29.10.05 00:36 
Der Debugger zeigt bei FPU-Exceptions nicht die richtige Zeile an, das liegt daran, dass die FPU diese Exceptions nicht sofort wirft, wenn sie intern auftreten. Hast du irgendeine Division, Wurzelziehen etc. weiter oben?
$veno Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 42



BeitragVerfasst: Sa 29.10.05 13:07 
Ja, ich hab sowohl die Funktion sqrt, als auch sqr sowie eine Division weiter oben verwendet.
Spaceguide
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Sa 29.10.05 13:51 
Überprüfe, ob das Argument bei Sqrt >= 0 ist und bei der Division, ob der Divisor <>0 ist. Deaktiviere mit

ausblenden Delphi-Quelltext
1:
Set8087CW($133F);					


am Anfang des Programms die FPU-Exceptions.
$veno Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 42



BeitragVerfasst: Sa 29.10.05 15:53 
Also bei der sqrt ist das Argument auf jeden Fall >= 0 denn ich will den Betrag des Arguments als Result haben und das hab ich so gelöst:
ausblenden Delphi-Quelltext
1:
sqrt(sqr(argument));					


Und bei der Division ist der Nenner auch <> 0.

Und die FPU-Exceptions zu deaktivieren bringt auch nix.