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

Hans Hagen pragma at wxs.nl
Thu Jun 23 22:26:53 CEST 2011


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) ?




-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the metapost mailing list