Ulf Zibis (12019-07-19):
> May be, but I believe single rounding over twice rounding is less fragile.

Yes. And two plastic bags will slow your fall more than one when you
jump from a plane.

> Try this:
>     printf("single rounding: %.40f\n", 130560LL * 1 / (double)12800);
>     printf("twice rounding:  %.40f\n", 130560LL * (double)(1 /
> (double)12800));
> Result:
> single rounding: 10.1999999999999992894572642398998141288757
> twice rounding:  10.2000000000000010658141036401502788066864
> The 1st result is closer to 10.2 as the 2nd.

By a completely negligible difference. And that is assuming it would
hold for other values of 10.2, which I am not convinced.

You are wasting your time and making the code less readable for no
actual benefit.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to