bug in the label bbox
Martin Budaj <[email protected]> Thu, 6 Aug 2020 20:26:55 +0200
| Newsgroups | gmane.comp.tex.metapost |
|---|---|
| Message-ID | <CALPsdSsxubLqnX5d=xf1E-6X=9zjJcng2=YM49drLcx_EL=RHQ@mail.gmail.com> |
Hi,
when using numbersystems other than scaled, the following example
fails to calculate the bounding box of an empty label (MetaPost
version 2.00):
beginfig(1);
path q;
q:=bbox thelabel("",(0,0));
message "BBOX: " & decimal xpart llcorner q & " " &
decimal ypart llcorner q & " " &
decimal xpart urcorner q & " " &
decimal ypart urcorner q;
endfig;
end
The results are:
scaled (OK, as bboxmargin is 2bp):
BBOX: -2 -2 2 2
decimal:
BBOX: -2 -1E+1000000 2 1E+1000000
binary:
BBOX: -2 -9.999999999999999999999999999999999E+999999 2
9.999999999999999999999
999999999999E+999999
double:
! Arithmetic overflow.
Best regards
Martin
--
http://tug.org/metapost/