Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-11

[patch] complex number division overflow

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dimitrios Apostolou

Hello list,

the last time I mentioned this bug (or misbehavior maybe?) I didn't get any feedback. Anyway, I hope I get some feedback now on this patch, which unfortunately makes complex number division more complex (;-) but fixes mistaken results in case of denominator overflow. Any ideas for optimizing this algorithm are welcome.

You may reproduce with:

	writeLn(cstr((-8E+231 - 1E+230*i) / (-1E+144 + 4E+199*i)));

without the patch it returns:
-0.000000000000000E+000

but with the patch:
-2.500000000000000E+030+2.000000000000000E+032i

Dimitris

Reply by email

Florian Klaempfl
to Dimitrios Apostolou
Hello list, the last time I mentioned this bug (or misbehavior maybe?) I didn't get any feedback.

Usually it's better to submit a bug report with the patch attached so such things don't get lost.

Anyway, I hope I get some feedback now on this patch, which unfortunately makes complex number division more complex (;-) but fixes mistaken results in case of denominator overflow. Any ideas for optimizing this algorithm are welcome.

Applied, thx.

Reply by email