From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 2149848B35 for ; Wed, 3 Jan 2024 19:40:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3952768CC60; Wed, 3 Jan 2024 21:40:29 +0200 (EET) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B564468CAF5 for ; Wed, 3 Jan 2024 21:40:22 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id E56B81BF207 for ; Wed, 3 Jan 2024 19:40:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1704310822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Q263JXjDEDVf6ECD0ETvkf0X8X+Y2SYGQw2F2Z1zOhw=; b=ZRso0tkD5YhxT9I404S7OwF/UCKrjzVoLxyzyWohLfoTpGy8QP7tHiWj8SHblQ9pVct7Ww 4OqL3PuL0OXwVFeAgsUgsxFsrtkbG0vjfbjqCw6hZgMrh41GLTamfeoyGE/oHLQi/4MTys u5UA1bhCjzuS///j/G4rZlQvXrYzWH6NPUy83HdEFTQAO+LUkfKbCuafIgW7HvFLCBtGwq xtAZUm631WRvp5A6bMR9qtl33N7yibG0uo8fSu1Q0ICXzv4IZoYad+b3Guwklmi7/vV+v0 9hz3jfjHs9m1893+FJvHHbNKMw0YZhXT7bnqLHmlEMKZiRG5bUq1FAgQ1qOcbw== Date: Wed, 3 Jan 2024 20:40:21 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240103194021.GA6420@pb2> References: <20240101193859.1038078-1-stefasab@gmail.com> <20240102001028.GW6420@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 1/2] libavutil/eval: introduce UINT64_MAX constant X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============7969124793050766514==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7969124793050766514== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="na/wsYrIKfOc6IAw" Content-Disposition: inline --na/wsYrIKfOc6IAw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 03, 2024 at 05:17:07PM +0100, Stefano Sabatini wrote: > On date Tuesday 2024-01-02 01:10:28 +0100, Michael Niedermayer wrote: > > On Mon, Jan 01, 2024 at 08:38:58PM +0100, Stefano Sabatini wrote: > > > This might be useful, e.g. when setting the random seed expressed as a > > > uint64_t. > > > --- > > > doc/utils.texi | 3 +++ > > > libavutil/eval.c | 1 + > > > 2 files changed, 4 insertions(+) > > >=20 > > > diff --git a/doc/utils.texi b/doc/utils.texi > > > index 0c4f146f4f..ac9b63826e 100644 > > > --- a/doc/utils.texi > > > +++ b/doc/utils.texi > > > @@ -1030,6 +1030,9 @@ area of the unit disc, approximately 3.14 > > > exp(1) (Euler's number), approximately 2.718 > > > @item PHI > > > golden ratio (1+sqrt(5))/2, approximately 1.618 > > > +@item UINT64_MAX > > > +maximum value expressed as an unsigned integer, corresponds to > >=20 > > > +18446744073709551616 ((2^64)-1) > >=20 > > this doesnt look right > > 2^x is even > > even -1 is odd > > 18446744073709551616 should be a odd number > > 18446744073709551615 looks more likely > >=20 > > double precission also doesnt like exactly ((2^64)-1) because the manti= sse has too few bits > >=20 > > (U)INT64_MIN should work though exactly in double >=20 > Updated. > doc/utils.texi | 3 +++ > libavutil/eval.c | 1 + > 2 files changed, 4 insertions(+) > 97bdb4309465dc8ad995abb2740d3f3063251398 0001-libavutil-eval-introduce-U= INT64_MAX-constant.patch > From f2772a82779b16982e3bc74176c6ff1011156096 Mon Sep 17 00:00:00 2001 > From: Stefano Sabatini > Date: Mon, 1 Jan 2024 20:32:38 +0100 > Subject: [PATCH 1/2] libavutil/eval: introduce UINT64_MAX constant >=20 > This might be useful, e.g. when setting the random seed expressed as a > uint64_t value. > --- > doc/utils.texi | 3 +++ > libavutil/eval.c | 1 + > 2 files changed, 4 insertions(+) >=20 > diff --git a/doc/utils.texi b/doc/utils.texi > index 0c4f146f4f..dec009a015 100644 > --- a/doc/utils.texi > +++ b/doc/utils.texi > @@ -1030,6 +1030,9 @@ area of the unit disc, approximately 3.14 > exp(1) (Euler's number), approximately 2.718 > @item PHI > golden ratio (1+sqrt(5))/2, approximately 1.618 > +@item UINT64_MAX > +maximum value expressed as an unsigned 64-bits integer, corresponds to > +18446744073709551615 ((2^64)-1) > @end table This has unexpected issues because its in double based table 18446744073709551615 cant be stored in a double so it will become 184467440= 73709551616 the difference is very small but the value is not the maximum representable= but rather the smallest non representable integer and also the smallest non rep= resentable double so really its 2^64 POW2_64 given that, POW2_64 seems the more precisse name. And how much faster is th= at than 2^64 ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The worst form of inequality is to try to make unequal things equal. -- Aristotle --na/wsYrIKfOc6IAw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZZW4HwAKCRBhHseHBAsP qymNAJ0crZ8UVjyT4DuJHHun9pszIN3iyQCeOmfXZ7+o9K4YUZFeBOTKPYIzvzI= =QH07 -----END PGP SIGNATURE----- --na/wsYrIKfOc6IAw-- --===============7969124793050766514== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============7969124793050766514==--