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 47EE649082 for ; Wed, 31 Jan 2024 23:34:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CFB7068D13B; Thu, 1 Feb 2024 01:34:55 +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 D593E68A943 for ; Thu, 1 Feb 2024 01:34:49 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3187C1BF203 for ; Wed, 31 Jan 2024 23:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1706744089; 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=Fqwjs4MMI0rObFsXK7ASp3Owk9hQ5bvELJjqa6PkbjA=; b=im7vs42sMWWFYMBI0IY4m+578nS99gdanJNuqEmaCGandTAX2Syq9cQnEBJf0yvQt7EGdM aZGxs0vsW3yEMk5E8x17a2IUsLY35vekPNhIfIEINSxr7RtVMEP5MhPzVusFmZahQBU6va GO6goF+oOiZPWe0raUyuh7Kcsnmw/PDkgIbe+GbTIrqdmA+BTcPriOc6X4ZmPRtWlgFSBU DRgRGdlqyQIomeGdGHn7Oes90OMVmQw8pHDODeu+VSLRlHDw7ui5bE8Ue3CYsasnMFig+f QYJVaiS+W5KNci9GjpB5ptteqLZcxnGTW/KkF3ioQYePl/oMq9E4S0Z76G8OaA== Date: Thu, 1 Feb 2024 00:34:48 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240131233448.GA6420@pb2> References: <20240131194746.11309-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] avutil/rational: Document what is to be expected from av_d2q() of doubles representing rational numbers 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="===============3676754410919386998==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3676754410919386998== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cwGDyLIxUBgRpDSy" Content-Disposition: inline --cwGDyLIxUBgRpDSy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 31, 2024 at 09:30:44PM +0100, epirat07@gmail.com wrote: >=20 >=20 > On 31 Jan 2024, at 20:47, Michael Niedermayer wrote: >=20 > > Signed-off-by: Michael Niedermayer > > --- > > libavutil/rational.h | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/libavutil/rational.h b/libavutil/rational.h > > index 8cbfc8e0669..c6ac9fb1d91 100644 > > --- a/libavutil/rational.h > > +++ b/libavutil/rational.h > > @@ -168,6 +168,10 @@ static av_always_inline AVRational av_inv_q(AVRati= onal q) > > * In case of infinity, the returned value is expressed as `{1, 0}` or > > * `{-1, 0}` depending on the sign. > > * > > + * In general rational numbers with |num| <=3D 1<<26 && |den| <=3D 1<<= 26 > > + * can be recovered exactly from their double representation. > > + * (no exceptions where found within 100M random ones) >=20 > I think you meant =E2=80=9Ewere=E2=80=9C here instead of =E2=80=9Ewhere= =E2=80=9C? fixed also tested 1B more cases and 1<<27 as a limit btw fails as is to be expected fro the amount of bits in the mantisse thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Any man who breaks a law that conscience tells him is unjust and willingly= =20 accepts the penalty by staying in jail in order to arouse the conscience of= =20 the community on the injustice of the law is at that moment expressing the= =20 very highest respect for law. - Martin Luther King Jr --cwGDyLIxUBgRpDSy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZbrZFAAKCRBhHseHBAsP q9ElAJ9mD+XOBpPRSLb03xX/+4oFXY6wRQCfTL1e9sKHSWG3YiE8WnGkMKEMdY0= =hjJJ -----END PGP SIGNATURE----- --cwGDyLIxUBgRpDSy-- --===============3676754410919386998== 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". --===============3676754410919386998==--