Difference between revisions of "RandomPolynomial Command"

From GeoGebra Manual
Jump to: navigation, search
m
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=4.0}}</noinclude>
 
<noinclude>{{Manual Page|version=4.0}}</noinclude>
 
{{command|CAS}}
 
{{command|CAS}}
;RandomPolynomial[ <Degree> , <Minimum for Coefficients min>, <Maximum for Coefficients max> ]
+
;RandomPolynomial[ <Degree d> , <Minimum for Coefficients min>, <Maximum for Coefficients max> ]
:Returns a randomly generated polynomial in ''x'', whose (integer) coefficients are in the range from ''min'' to ''max'', both included.  
+
:Returns a randomly generated polynomial in ''x'' of degree at most ''d'', whose (integer) coefficients are in the range from ''min'' to ''max'', both included.  
;RandomPolynomial[ <Variable Var>, <Degree> , <Minimum for Coefficients min>, <Maximum for Coefficients max> ]
+
;RandomPolynomial[ <Variable Var>, <Degree d> , <Minimum for Coefficients min>, <Maximum for Coefficients max> ]
:Returns a randomly generated polynomial in ''Var'', whose (integer) coefficients are in the range from ''min'' to ''max'', both included.
+
:Returns a randomly generated polynomial in ''Var'' of degree at most ''d'', whose (integer) coefficients are in the range from ''min'' to ''max'', both included.
 
{{note|In both cases if ''min'' or ''max'' are not integers, ''round(min)'' and ''round(max)'' are used instead.}}
 
{{note|In both cases if ''min'' or ''max'' are not integers, ''round(min)'' and ''round(max)'' are used instead.}}

Revision as of 12:59, 11 June 2011


This command works in CAS View only.

RandomPolynomial[ <Degree d> , <Minimum for Coefficients min>, <Maximum for Coefficients max> ]
Returns a randomly generated polynomial in x of degree at most d, whose (integer) coefficients are in the range from min to max, both included.
RandomPolynomial[ <Variable Var>, <Degree d> , <Minimum for Coefficients min>, <Maximum for Coefficients max> ]
Returns a randomly generated polynomial in Var of degree at most d, whose (integer) coefficients are in the range from min to max, both included.
Note: In both cases if min or max are not integers, round(min) and round(max) are used instead.
© 2024 International GeoGebra Institute