>>Does the length of those numbers happen to be fixed? It they are all
>>exactly 13000 decimals then it should be possible to create a more
>>optimised parser.

Well actually they can have any number of digits less than 13000.
But the only post processing of the numbers is calculating the
binary logarithm of the number. Does that help?

>>It would also help if you could post a working example of your code
>>and some test data somewhere so people can run it and test if for
>>themselves.

I have a slow Internet connection. So I will attach the script I
used to generate the cases instead.(Note: It will take a few minutes
to complete)
# -*- coding: utf-8 -*-
import random
fibs = [0]*60001
fibs[1] = 1
for i in xrange(2, 60001):
	fibs[i] = fibs[i-1] + fibs[i-2]
for _ in xrange(2000):
    i = random.randint(58000, 60000)
    print fibs[i]
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to