From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107341 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Keith McKay Newsgroups: gmane.comp.tex.context Subject: Re: Arithmetic Overflow error in MetaFun Date: Sun, 17 May 2020 09:19:12 +0100 Message-ID: References: <4830f0a0-ece9-53ce-2768-af9110f3962a@gmail.com> <09327997-b14d-c285-6daf-00a11dc0c86d@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4368034293187293310==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="24262"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Sun May 17 10:19:47 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 1jaEWR-0006E4-98 for gctc-ntg-context-518@m.gmane-mx.org; Sun, 17 May 2020 10:19:47 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DDAE9183D69; Sun, 17 May 2020 10:19:28 +0200 (CEST) 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 6dmP4nU9ZY1p; Sun, 17 May 2020 10:19:28 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 10600183EF7; Sun, 17 May 2020 10:19:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C426A183D69 for ; Sun, 17 May 2020 10:19:26 +0200 (CEST) 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 qJMjNSjpeEdZ for ; Sun, 17 May 2020 10:19:25 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.173; helo=mail-il1-f173.google.com; envelope-from=mckaymeister@gmail.com; receiver= Original-Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) (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 AF1E6183CF4 for ; Sun, 17 May 2020 10:19:25 +0200 (CEST) Original-Received: by mail-il1-f173.google.com with SMTP id c20so4676309ilk.6 for ; Sun, 17 May 2020 01:19:25 -0700 (PDT) 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=HwMGwUirGCWFAqmRMSwchAtZ/yuQ+kOv0aQomdkVHdI=; b=ELZOSa+/oWkga1/Gmah7bhVGaX7iuO+SZ3S6KXKHbv+t1diwJNgWRGIkjgMLnH54+t bQk6x1HevAKMr/j8qGKjcFJNrXRPFNFaa89fGUr1qYKe+DUCQop+vH9VKLawosOtLUoR dfhgpEx+fYFJqElORs1DwgMBzlVK2q/+rnZfMkVTxAN3M5eRhmZQ5IreioPEuqUDdw2V w0lpNvZg8yoG7UDA8fdvyJTA+Z1u5yYcWIUFPfBinymnYD3QOTkROl5olbcMATSFNDFZ u4/v9ykP6GM4aRNfhmFHXZk7nOVSqtQ8GiG8ooz5vWSnaV0ERhwVJWmToghOInSMyz2s PWRA== 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=HwMGwUirGCWFAqmRMSwchAtZ/yuQ+kOv0aQomdkVHdI=; b=FJfZVhgXQmeJdSdVzNW95JfoVstDlX8M0NSudR7CtFOQ2TfoTA/dhVxaDlojgWO2Q+ ADfkagyD+5z77IjK1Vj+tKHWmpaWmVHULPhchfSf4o+3/nWqCl+PomqRMhAG+NWrYMxJ 5veUcnBWzqsRsvuiOpPMfvbGPn4Ey6kQWmeV0MBlG742kzynt+l6ExzyupB27PcKUFwn w5u46kSu1fG6ie8ql4i9k/rqAy8WqlPrk2fuz9qjpE/VrYdPsTEKJ+gm/kV3/afFmzhv vQXrflI9tzzmnmqB5/ltlyIFDQHC/slxzFtLtOZ06TxLFWTJbJF0qN6nprJaniQiZ6pQ ksXw== X-Gm-Message-State: AOAM532Bal9DZE4uGA0VSYhoIIWkGLwAR2j85ixERdK5u7khUM81DB7F KJZ/rrSCMHJCn9peoTyEUkx58Vw+jDiocLk9rXo= X-Google-Smtp-Source: ABdhPJwtrHbHwm641bCVQnJKD4qKRP5Uv7FsoocCBmsPRglnbtErC+yhEi0xJ4KBuHJYmM7eCF+JkRO83jUuEHc/dgo= X-Received: by 2002:a92:b743:: with SMTP id c3mr8618380ilm.92.1589703564126; Sun, 17 May 2020 01:19:24 -0700 (PDT) In-Reply-To: <09327997-b14d-c285-6daf-00a11dc0c86d@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:107341 Archived-At: --===============4368034293187293310== Content-Type: multipart/alternative; boundary="0000000000003cefb505a5d3b4e6" --0000000000003cefb505a5d3b4e6 Content-Type: text/plain; charset="UTF-8" Thanks for your help Hans and the pointer to the extended math library. Lots more to explore now. Best Wishes Keith On Sat, 16 May 2020, 20:46 Hans Hagen, wrote: > On 5/16/2020 4:48 PM, Keith McKay wrote: > > Answering my own problem here. > > > > I've just searched through the mailing list archives and it seems that > > if I add [instance=doublefun] I do not get the Arithmetic Overflow > > error. Joy! > fwiw, we have also instance=decimalfun > > concerning arithmic: > > in metapost we have > > scaled : upto 4K bp > double : 64 bit floats > decimal : configurable accuracy > complex : dual doubles (only in luametafun) > > in lmtx lua we have: > > integer : lua tries to be clever but mixing leads to double > float : lua tries to be clever > decimal : userdata arbitrary precision (only in lmtx) > complex : userdata dual doubles (only in lmtx) > > (in lmtx we have an extended math library and these function are also > available in luametafun) > > 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 > ----------------------------------------------------------------- > --0000000000003cefb505a5d3b4e6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for your help Hans and the pointer to the ext= ended math library. Lots more to explore now.
Best W= ishes
Keith

On Sat, 16 May 2020, 20:46 Han= s Hagen, <j.hagen@xs4all.nl>= wrote:
On 5/16/2020 4:48 PM, Keith= McKay wrote:
> Answering my own problem here.
>
> I've just searched through the mailing list archives and it seems = that
> if I add [instance=3Ddoublefun] I do not get the Arithmetic Overflow <= br> > error. Joy!
fwiw, we have also instance=3Ddecimalfun

concerning arithmic:

in metapost we have

scaled=C2=A0 : upto 4K bp
double=C2=A0 : 64 bit floats
decimal : configurable accuracy
complex : dual doubles (only in luametafun)

in lmtx lua we have:

integer=C2=A0 : lua tries to be clever but mixing leads to double
float=C2=A0 =C2=A0 : lua tries to be clever
decimal=C2=A0 : userdata arbitrary precision (only in lmtx)
complex=C2=A0 : userdata dual doubles (only in lmtx)

(in lmtx we have an extended math library and these function are also
available in luametafun)

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.n= l | www.pragma-pod.nl
-----------------------------------------------------------------
--0000000000003cefb505a5d3b4e6-- --===============4368034293187293310== 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== --===============4368034293187293310==--