beautypg.com

HP Prime Graphing Calculator User Manual

Page 391

background image

Functions and commands

387

EXPR

Parses the string str into a number or expression.

expr (str)

Examples:

expr("2+3")

returns

5

.

expr("X+10")

returns

100

.

(If the variable X has the value 90)

ezgcd

Uses the EZ GCD algorithm to return the greatest common

divisor of two polynomials with at least two variables.

ezgcd(Poly,Poly)

Example:

ezgcd(x^2-2*xy+y^2-1,x-y)

gives

1

f2nd

Returns a list consisting of the numerator and denominator of

an irreducible form of a rational fraction.

f2nd(RatFrac)

Example:

f2nd(42/12)

returns

[7,2]

faces

Returns the list of the faces of a polygon or polyhedron. Each

face is a matrix of n rows and three columns (where n is the

number of vertices of the polygon or polyhedron).

faces(Polygon or Polyedr)

Example:

faces(polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2
,6]))

gives

polyhedron[[[0,0,0],[0,5,0],[0,0,5]],[[0,0,0]
,[0,5,0],[1,2,6]],[[0,0,0],[0,0,5],[1,2,6]],[
[0,5,0],[0,0,5],[1,2,6]]]

factorial

Returns the factorial of an integer or the solution to the gamma

function for a non-integer.

factorial(Intg(n)||Real(a))

Example:

factorial(4)

gives

24