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, <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=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
-----------------------------------------------------------------