anchor.diff:          _    -> T - 1
       end.
   
  -%% @doc Returns the smallest integer not smaller than X. 
  +%% @doc Returns the smallest integer not smaller than X.
   -spec ceil(X::number()) -> integer().
   ceil(X) when X < 0 ->
       erlang:trunc(X);
  
positive.code: %% @doc Try to check whether common-test is running.
  -spec is_unittest() -> boolean().
  is_unittest() ->
      Pid = self(),
      spawn(fun () ->
                    case catch ct:get_status() of
                        no_tests_running -> Pid ! {is_unittest, false};
                        {error, _} -> Pid ! {is_unittest, false};
                        {'EXIT', {undef, _}} -> Pid ! {is_unittest, false};
                        _ -> Pid ! {is_unittest, true}
                    end
            end),
      receive
          ?SCALARIS_RECV({is_unittest, Result}, Result)
      end.
  
  -spec make_filename([byte()]) -> string().
  
negative.code:     Length = length(List) + 1,
      RandomNum = randoms:rand_uniform(1, Length),
      {lists:nth(RandomNum, List), Length - 1}.
  
  %% @doc Removes a random element from the (non-empty!) list and returns the
  %%      resulting list and the removed element.
  -spec pop_randomelem(List::[X,...]) -> {NewList::[X], PoppedElement::X}.
  pop_randomelem(List) ->
      pop_randomelem(List, length(List)).
  
  %% @doc Removes a random element from the first Size elements of a (non-empty!)
  %%      list and returns the resulting list and the removed element.
  -spec pop_randomelem(List::[X,...], Size::non_neg_integer()) -> {NewList::[X], PoppedElement::X}.
  pop_randomelem(List, Size) ->
      {Leading, [H | T]} = lists:split(randoms:rand_uniform(0, Size), List),
  