On Mon, 15 Nov 2004 08:48:24 +0900 Dennis Ranke <dennis.ranke / epost.de> wrote: > Here is a small update to my solution. A simple optimization speeds up > the solver by a factor of nearly two. Now I'm down to 5 seconds for the > worst case on this machine :) > > [snip] Interesting read. I never thought about building the terms bottom up instead of top down ;). I was in such a recursive mindset. I hope your ideas don't force me to rethink my solutions and spend even more time that I don't have ;). One thing I noticed is, that you used: > best_difference = (@target * 1000).abs this shurely works but is cheating. Why not use: > best_difference = 1.0/0.0 That would really be bigger than any other difference you'd encounter. It is not possible to find all solutions, using your programm, did I understand this right? Best Regards, Brian -- Brian Schröäer http://www.brian-schroeder.de/