use truncate for integer (ISO standard, obs from Paulo Moura).

This commit is contained in:
Vitor Santos Costa 2010-02-26 00:16:32 +00:00
parent 6f745469b0
commit 9f098a0297

View File

@ -944,7 +944,7 @@ ord_list_to_rbtree(List, t(Nil,Tree)) :-
Nil = black('', _, _, ''),
Ar =.. [seq|List],
functor(Ar,_,L),
Height is integer(log(L)/log(2)),
Height is truncate(log(L)/log(2)),
construct_rbtree(1, L, Ar, Height, Nil, Tree).
construct_rbtree(L, M, _, _, Nil, Nil) :- M < L, !.