[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcd and lcm (was: Re: math fonts)



As I just sent a copy of my own tries at METAFONT to Joerg Knappen,
I feel I should comment on some symbols my fonts contain, as I never
published them in any way, but I think they could be useful and
could be included in the new math fonts. These are delimiters
to denote greatest common divisor and least common muptiple.
Currently, there is no real standard for these, one is to use
gcd(a,b) in English, ggT(a,b) in German and so on, one is to
simply use (a,b) which is a notation overloaded with different
meanings and often causes confusion when read, also,
(a,b) lacks a standard counterpart for lcm
(I've seen {a,b} and [a,b] for this, both are very original and
unambiguous notations...)

So I propose the following symbols for this (first some ASCII art,
see below for my metafont code (only base size here; of course,
they should come with extensibles, which I have prepared, too):
  __        __
  \          /                      /       \
   \  a, b  /    for the gcd and   /  a, b,  \ for the lcm
    \      /                      /_        __\

The idea here is to represent two angles of a downward pointing
triangle (as the gcd of a and b is \leq \min(a,b)) and of an
upward pointing triangle (analogous reason for the lcm), respectively.

These symbols seem to match all criteria I could think of for new math
symbols, e.g. they are unambiguous, international, mnemonic, consistent
(they are not to far away from at least one existing notation, yet
different enough), and concepts belonging together are represented
by resembling symbols. So much for this proposal.

Here's my metafont code (rather simple changes to cm's slash and backslash
programs), I also prepared macros to use these symbols (my suggestion
here is \gcd{a,b} and \lcm{a,b}, with \biggcd etc for the other sizes
and \Gcd and \Lcm for automatic \left and \right insertion).

cmchar "Left least common multiple delimiter";
beginchar(oct"002",10u#,body_height#,paren_depth#);
italcorr body_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
rt x1=hround(w-u)+eps; top y1=h+eps;
lft x2=hround 2u-eps; bot y2=-d-eps;
x3=x1; y3=y2;
draw z1--z2--z3;  % diagonal and horizontal
penlabels(1,2,3); endchar;

cmchar "Right least common multiple delimiter";
beginchar(oct"003",10u#,body_height#,paren_depth#);
adjust_fit(0,0); pickup rule.nib;
lft x1=hround u-eps; top y1=h+eps;
rt x2=hround(w-2u)+eps; bot y2=-d-eps;
x3=x1; y3=y2;
draw z1--z2--z3;  % diagonal and horizontal
penlabels(1,2,3); endchar;

cmchar "Left greatest common divisor delimiter";
beginchar(oct"004",10u#,body_height#,paren_depth#);
adjust_fit(0,0); pickup rule.nib;
lft x2=hround 2u-eps; top y2=h+eps;
rt x3=hround(w-u)+eps; bot y3=-d-eps;
x1=x3; y1=y2;
draw z1--z2--z3;  % horizontal and diagonal
penlabels(1,2,3); endchar;

cmchar "Right greatest common divisor delimiter";
beginchar(oct"005",10u#,body_height#,paren_depth#);
italcorr body_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
rt x2=hround(w-2u)+eps; top y2=h+eps;
lft x3=hround u-eps; bot y3=-d-eps;
x1=x3; y1=y2;
draw z1--z2--z3;  % horizontal and diagonal
penlabels(1,2,3); endchar;

--
Johannes Kuester                    kuester@mathematik.tu-muenchen.de
Mathematisches Institut der
Technischen Universitaet Muenchen