[Haskell-cafe] Deadlock in real number multiplication (Was: Where's the problem ?)

Rome roman.kraehling at unibw-muenchen.de
Wed Jul 4 14:43:34 EDT 2007

> A friend of mine compiled it under Linux and got:
> .
> .
> .
> 32779 :  1   1 ---32776-->  0
> 32780 :  1   0 ---32777--> -1
> Main: Ix{Integer}.index: Index (32766) out of range ((0,32765))
> If I convert every Integer into Int and use instead of the generic list
> functions the prelude-list functions, it works.

--... and the result is right?

> I don't have any idea, where the problem might be...

--Stupid question: Did you pay enough attentation to carries? There might be
--an unresolvable dependency if you request a digit which depends on
--infinitely many carries from following digits.

Thx for your reply.
The next output-digit depends on several digits of the input, which are
determined by the rectangles defined in module /Schedule/. Every coordinate
of a single rectangle is unique by definition.
Because I use Signed-Digit-Representation, carries are only local in a
single call of the multiplication -subroutine. Further my program is the
implementation of an online-algorithm, leading digits are computed first, so
an infinte number of carries shouldn't be the reason, I think.
In my opinion there is something wrong with the use of Integer because of
the Linux-error message. 
I can only verify the correctness of the result of the first 30
output-digits, and these are okay in both cases: Int and Integer.
View this message in context: http://www.nabble.com/Where%27s-the-problem---tf4022913.html#a11435728
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

More information about the Haskell-Cafe mailing list