[metapost] [mp-implementors] MetaPost 1.750 (alpha version)

Nicola nvitacolonna at gmail.com
Thu Jun 23 23:22:01 CEST 2011


In article <4E03A18D.8000102 at wxs.nl>, Hans Hagen <pragma at wxs.nl> wrote:

> On 23-6-2011 9:41, Troy Henderson wrote:
> > Is there a built-in way with MetaPost 1.750 and with --math=double to
> > "round" a number by using only a certain number of significant digits?
> >
> > For example, I'm getting an output of
> >
> > 7.999999999999998
> >
> > which is "begging" to be 8.
> 
> So maybe we need a round(n,precision) ?

Maybe with a different name (roundoff, roundfloat, roundprec, ...)? Plain 
MetaPost already defines a "round" vardef... 

Nicola



More information about the metapost mailing list