PowLink

From OpenCog

The PowLink is a numeric Link type that computes the power of its first argument raised to it's second argument. When given two vector arguments, it computes the power component by component. If one is a scalar, then a conventional scalar operation is applied.

Examples:

(cog-execute! (Pow (Number 2) (Number 3)))


returns

 (NumberNode "8")

Likewise

 (cog-execute! (Pow (Number 2 3 4 5) (Number 3)))

returns

  (NumberNode "8 27 64 125")

and

  (cog-execute! (Pow (Number 2) (Number 1 2 3 4 )))

returns

  (NumberNode "2 4 8 16")

See also