anchor.diff:        lists:flatten(io_lib:format(F, []))
     end.
   
  +math_ceil(V) ->
  +  try
  +    erlang:ceil(V)
  +  catch
  +    _:_ ->
  +      T = erlang:trunc(V) * 1.0,
  +      if
  +        V - T > 0 -> T + 1;
  +        true -> T
  +      end
  +  end.
  +
   -ifdef(TEST).
   vice_prv_subs_writer_internal_test_() ->
     {setup,
  
positive.code:           io_lib:format(
              "#EXTM3U~n#EXT-X-TARGETDURATION:~p~n#EXT-X-VERSION:3~n#EXT-X-MEDIA-SEQUENCE:0~n#EXT-X-PLAYLIST-TYPE:VOD~n~s~n#EXT-X-ENDLIST",
              [
               ceil(MaxDuration),
               string:join(segments(Segments), "\n")
              ])));
      Other ->
  
negative.code:   {From0, Duration0} = case {Repeat, PreviousCue} of
                                  {true, #{duration := #{duration := ExtraDuration, id := ID}}} ->
                                    {ID,
                                     Duration + math_ceil(ExtraDuration)};
                                  _ ->
                                    {From, Duration}
                                end,
  