From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/110077 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Jairo A. del Rio" Newsgroups: gmane.comp.tex.context Subject: Re: About xdecimal Date: Mon, 28 Dec 2020 10:46:35 -0500 Message-ID: References: <20f79089-3515-8dba-57f0-9d54124622a5@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8686289077743673118==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37185"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 28 16:47:09 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktujl-0009Z6-5q for gctc-ntg-context-518@m.gmane-mx.org; Mon, 28 Dec 2020 16:47:09 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 09BEA1C1717; Mon, 28 Dec 2020 16:46:51 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5AwLxn8LulDl; Mon, 28 Dec 2020 16:46:48 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B724D1C163D; Mon, 28 Dec 2020 16:46:48 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 96CEC1C1639 for ; Mon, 28 Dec 2020 16:46:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a7GANeAx1KZ4 for ; Mon, 28 Dec 2020 16:46:46 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.53; helo=mail-wr1-f53.google.com; envelope-from=jairoadelrio6@gmail.com; receiver= Original-Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id C29591C1546 for ; Mon, 28 Dec 2020 16:46:46 +0100 (CET) Original-Received: by mail-wr1-f53.google.com with SMTP id m5so11626668wrx.9 for ; Mon, 28 Dec 2020 07:46:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PQjI93M9HXCHu8aKAWlohPjijIxqLcdjH4Bo6w6uYJg=; b=mn5812bRi+1CYxNwTve2zKDAdC3Hm56PsgOyp/o1ZPHcMbiAJeXxNGeTAvboKXZBzk gGwNiPLdXerjAiJko51fFWcguK1mn7U8pczYlO2+K8E7dJqkW+y4sVZe9KAnt9CsPck2 Qg8AjXoY4YJ50H7WkNvsrfNL4+KP5zkHrYSqRkoY8y7nS2ghXNp/cbslT8ZAXgHyNiXj lxYXx8yyWDmPt+ujq+RmHf6JaHVs3QfhjSGWvabPpkSQYKxh0lUIb7Ra0ILqFKobWiRy ARztHomLExm3dAaIbC1RVCPba0vPfJI9cbasO0yVu2eyGvSiNBr9S/C9jZmsXH4Xfk73 Y7/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PQjI93M9HXCHu8aKAWlohPjijIxqLcdjH4Bo6w6uYJg=; b=G7jLaLl7dy5M6CdWVz7Gdi1+xZ8HTAZS7Z+YzdHWY7iGaB8t+qGHaAKEdP0J1OkMot JpA6ILE+dPCkMS+S8ud8X7QuHoZtS9Ded6wwmOY7WjbWyTmkQmF5ZyUMbvsHQ6VyLxry eQi8rZ2owMZHz2QGchZels/OhEsd3hbReFs3cDJltnwJqwtXbxSQp2YNxq44F1GADo7G LLYuawjDXlQJVBHXygqH4An1vnd0HLwsf7rVGpoWT2W6zQsaQFF3yjBgXaB8Uw/+3kpB l/UiswgNueyj4Ows8IY7i+sL915tdChcCoOAVgYHSswqjLrNTDS3SxdWkp8wds1Ud0+b 3Gbw== X-Gm-Message-State: AOAM531dJ3aRss8LHxmBteErPGUGtUJYAL81gvIJHlJth8GQISf/8BNS CPxFCqNXazl+h9ducslYdBvQDlex5Dcx7y9WubU= X-Google-Smtp-Source: ABdhPJzfOheyLnhnL9wyGoEM51n6IZn4Dq+Fc1CMSP8l9BzGqhABdifVWzjBv7ujRsVx4Vq13kJOzsdRCW5X2BUKjkM= X-Received: by 2002:adf:92c2:: with SMTP id 60mr52295045wrn.266.1609170406402; Mon, 28 Dec 2020 07:46:46 -0800 (PST) In-Reply-To: <20f79089-3515-8dba-57f0-9d54124622a5@xs4all.nl> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:110077 Archived-At: --===============8686289077743673118== Content-Type: multipart/alternative; boundary="00000000000074ee8d05b7882edd" --00000000000074ee8d05b7882edd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I forgot to mention ceil and floor, just in case they can be implemented. I have a long list of examples, so testing will be easy. Thank you very much. Best regards, Jairo :) El lun, 28 de dic. de 2020 a la(s) 10:39, Hans Hagen (j.hagen@xs4all.nl) escribi=C3=B3: > On 12/28/2020 2:33 PM, Jairo A. del Rio wrote: > > Hi, list. > > > > I've tried using the xdecimal library included with LuaMetaTeX and I > > have some remarks: > > > > 1. Shifts are decimal, not binary: 145 >> 1 gives 14. > > this is how decnumber defines shift: digits > > > 2. Integer division (//) is not implemented. Is that by design? > > i'll add that one > > > 3. Following 2, what would be the way to handle integer division, > > remainder... for large numbers? > > i'll add a % b > > > Thank you in advance. > better first do the testing > > Hans > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- > --00000000000074ee8d05b7882edd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I forgot to mention ceil and floor, just in case= they can be implemented. I have a long list of examples, so testing will b= e easy. Thank you very much.

Best regards,

Jair= o :)

El lun, 28 de dic. de 2020 a la(s) 10:39, Hans Hagen (j.hagen@xs4all.nl) escribi=C3=B3:
On 12/28/2020 2:33 PM, Jairo = A. del Rio wrote:
> Hi, list.
>
> I've tried using the xdecimal library included with LuaMetaTeX and= I
> have some remarks:
>
> 1. Shifts are decimal, not binary: 145 >> 1 gives 14.

this is how decnumber defines shift: digits

> 2. Integer division (//) is not implemented. Is that by design?

i'll add that one

> 3. Following 2, what would be the way to handle integer division,
> remainder... for large numbers?

i'll add a % b

> Thank you in advance.
better first do the testing

Hans

-----------------------------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Hans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Ridderstraat 27 | 80= 61 GH Hasselt | The Netherlands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 tel: 038 477 53 69 | www.pragma-ade.nl | www.= pragma-pod.nl
-----------------------------------------------------------------
--00000000000074ee8d05b7882edd-- --===============8686289077743673118== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============8686289077743673118==--