Martin Becker on Mon, 03 Oct 2022 11:53:38 +0200


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

Vectors and integer exponentiation


Hello,

In GP (tested with versions 2.15.0 and 2.13.1), the expression

    2^[4,6,8]

evaluates to a vector of floating point numbers, while

    [2^n|n<-[4,6,8]]

evaluates to a vector of integers.

I would have expected integers in the first case, too,
or perhaps a type error if exponentiation was not meant to
auto-unbox vectors.  Is this a bug?

Greetings,
Martin