[metapost] turningnumber bug?

Taco Hoekwater taco at elvenkind.com
Sat Aug 11 12:00:04 CEST 2007


Dan Luecking wrote:
> Dear MetaPosters:
> 
> I wonder if a few of you would try the following code and tell
> me what you get. My MetaPost (TeXLive2007) claims this version:
>    This is MetaPost, Version 1.000 (Web2C 7.5.5) (mem=mpost 2007.6.26)

> I checked the bug tracker at foundry.supelec.fr/projects/metapost/
> without finding any mention of a possible bug.
> 
> Here is the code:
>   path P;
>   message "";
>   P := (4,-0.00012) -- (-16,49) -- (17,32)
>        --(17.0,0)..controls (13.0,0) and (9,0)..cycle;
>   % shows -2 and a warning:
>   show turningnumber P;
> 
>   P:=reverse P;
>   % shows 1:
>   show turningnumber P;
> 
>   % make a tiny change in point 0:
>   P := (4,0.000) -- (-16,49) -- (17,32)
>        --(17.0,0)..controls (13.0,0) and (9,0)..cycle;
>   % correctly shows -1:
>   show turningnumber P;
> end.

The current repository version reports:

   [taco at ntg mp]$ mpost dan_test.mp
   This is MetaPost, Version 1.001 (Web2C 7.5.5)
   (dan_test.mp
   >> -1
   >> 1
   >> -1 )
   Transcript written on dan_test.log.

I guess that makes it about time for a 1.001 release.

Best wishes,
Taco


More information about the metapost mailing list