a .. b



-----maxima-bounces at math.utexas.edu wrote: -----

>After that, we can choose whether a..b means
>   A) the integers s.t. a<=x<=b
>or
>   B) all x s.t. x=a+i and a<=x<=b (where i is an integer)

I converted to plan 'B' --- it's consistent with Macsyma, I think. Examples

  (%i2) -1 .. 1;
  (%o2) [-1,0,1]

  (%i3) 1/2 .. 3;
  (%o3) [1/2,3/2,5/2]

  (%i4) %i .. %i + 2;
  (%o4) [%i,%i+1,%i+2]

  (%i5) a .. a;
  (%o5) [a]

  (%i6) a .. a - 1;
  (%o6) []

  (%i7) a .. b;
  (%o7) a .. b

  (%i8) assume(a > b)$

  (%i9) a .. b;
  (%o9) []

  (%i10) assume(equal(a,aa))$

  (%i11) a .. aa;
  (%o11) [a]

Compare:

  (%i12) 40.0 .. 42.0b0;
  (%o12) [40.0,41.0,42.0]

  (%i13) 40.0b0 .. 42.0b0;
  (%o13) [4.0b1,4.1b1,4.2b1]


Thanks for all the advice. My dot-dot operator is a trifling contribution.
But that doesn't make it easy to get "right."

Barton