anchor.diff:  int_ceil(X) ->
       T = trunc(X),
       case (X - T) of
  -        Neg when Neg < 0 -> T;
           Pos when Pos > 0 -> T + 1;
           _ -> T
       end.
  
positive.code:     log2floor(Int bsr 1, 1 + N).
  
  
  %%
  %% Tests
  %%
  
negative.code:                  digits(LargeNorm)),
      ?assertEqual(LargeNorm,
                   list_to_float(digits(LargeNorm))),
      %% issue #10 - mochinum:frexp(math:pow(2, -1074)).
      ?assertEqual("5.0e-324",
                   digits(math:pow(2, -1074))),
      ok.
  
  frexp_test() ->
      %% zero
      ?assertEqual({0.0, 0}, frexp(0.0)),
      %% one
      ?assertEqual({0.5, 1}, frexp(1.0)),
      %% negative one
      ?assertEqual({-0.5, 1}, frexp(-1.0)),
      %% small denormalized number
      %% 4.94065645841246544177e-324
      <<SmallDenorm/float>> = <<0,0,0,0,0,0,0,1>>,
      ?assertEqual({0.5, -1073}, frexp(SmallDenorm)),
      %% large denormalized number
      %% 2.22507385850720088902e-308
      <<BigDenorm/float>> = <<0,15,255,255,255,255,255,255>>,
      ?assertEqual(
         {0.99999999999999978, -1022},
         frexp(BigDenorm)),
      %% small normalized number
      %% 2.22507385850720138309e-308
      <<SmallNorm/float>> = <<0,16,0,0,0,0,0,0>>,
      ?assertEqual({0.5, -1021}, frexp(SmallNorm)),
      %% large normalized number
      %% 1.79769313486231570815e+308
      <<LargeNorm/float>> = <<127,239,255,255,255,255,255,255>>,
      ?assertEqual(
          {0.99999999999999989, 1024},
          frexp(LargeNorm)),
      %% issue #10 - mochinum:frexp(math:pow(2, -1074)).
      ?assertEqual(
         {0.5, -1073},
         frexp(math:pow(2, -1074))),
      ok.
  
  -endif.
  