[metapost] bug in the label bbox
Martin Budaj
m.budaj at gmail.com
Thu Aug 6 20:26:55 CEST 2020
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
More information about the metapost
mailing list.