Macaulay2 » Documentation
Packages » RealRoots :: variations
next | previous | forward | backward | up | index | toc

variations -- the number of sign changes of an ordered list of numbers

Synopsis

Description

This computes the number of sign changes in the ordered list l.

i1 : L = for i to 10 list random(-50,50)

o1 = {-26, 15, 21, 22, -31, -31, 41, 22, 43, 29, 22}

o1 : List
i2 : variations(L)

o2 = 3

Ways to use variations :

For the programmer

The object variations is a method function.