[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why does happen?

From: Dave Sworin
Subject: Why does happen?
Date: Thu, 18 Oct 2012 02:45:04 -0700 (PDT)

I generated a list with 501 items in it.  Each item in the list is a list with the form [N,LOG_OF_N_FACTORIAL]. N is an integer from 0 to 500.  LOG_OF_N_FACTORIAL is a float and, except for the trivial cases, all have exactly 15 significant digits.  For example, [2,0.301029995663981] and [500,1134.08640853513].  When I put it in a file "" as a predication like my_log_n_factorial([[0,0.0],[1,0.0],[2,0.301029995663981],...,[500,1134.08640853513]]). all by itself and try to consult it in the gprolog (1.3.1 or 1.4.1) interpreter, I must increase the GLOBALSZ to a very large value to get it to successfully consult the file.  Both systems being 64-bit I made GLOBALSZ=1920000.  When the consult('') is successful I query "my_log_n_factorial(X)." and the answer is "no".  If I cut the list in half, everything works fine, with either the top half or the bottom half of the list.  Also, if I consult my own prolog file, which has a lot of predicates defined, and then paste into the gprolog interpreter "LIST = [[0,0.0],[1,0.0],[2,0.301029995663981],...,[500,1134.08640853513]],my_prolog_pred(LIST,TREE)." and then the call succeeds without a problem.  Why can't I consult a file with a predication with a single argument which is an array of 500 rows by 2 columns?  It seems to me I should be able to do this.  Why does the query say "no" if perhaps there is not enough memory for the query?  Also, why does it take around 20 seconds to compile?  The text file which contains the list is 11560 bytes in size.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]