The randPoly() Command

We're glad you came by, but you might find what you're looking for elsewhere.

TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it.

Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope.

randpoly.png

Command Summary

Generates a random polynomial.

Command Syntax

randPoly(var,deg)

Menu Location

  • Press 2nd MATH to enter the MATH popup menu.
  • Press 7 to enter the Probability submenu.
  • Press 8 to select randPoly(.

Calculator Compatibility

This command works on all calculators.

Token Size

1 byte

The randPoly() command generates a random polynomial. randPoly(var,deg) generates a random polynomial in variable var of degree deg. The coefficients of each power of var are random integers from -9 to 9.

:RandSeed 0
:randPoly(x,5)
           4*x^5-2*x^4-7*x^2+8*x+8

Advanced Uses

Using the RandSeed command makes the resulting polynomial entirely predictable: every time you set the random seed to some variable, you will get the same random coefficients afterwards. Also see RandSeed for details of how random numbers are generated.

Error Conditions

260 - Domain error happens when the value of deg is not between 0 and 99.

Related Commands

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.