Sunteți pe pagina 1din 53

Command

Description

Syntax:value!
Factorial.Returnsthefactorialofapositiveinteger.Fornonintegers,!=(x+1).Thiscalculatesthe
Gammafunction.
Example:6!returns720

Syntax:%(x,y)xpercentofy.
Returns(x/100)*y.
Example:%(20,50)returns10

%CHANGE

Syntax:%CHANGE(x,y)
Percentchangefromxtoy.Returns100*(yx)/x.
%CHANGE(20,50)returns150

%TOTAL

Syntax:%TOTAL(x,y)
Percenttotal;thepercentageofxthatisy.Returns100*y/x.
%TOTAL(20,50)returns250.

Parentheses.
Insertsapairofparentheses.

Syntax:Object1Object2
Multiplication.
ReturnstheresultofmultiplyingObject1andObject2.Theobjectsmaybenumericalvaluesor
expressionsthatreturnnumericalresults.Theobjectsmayalsobelistsormatricesofappropriate
dimensions.
Example:3*2returns6

Syntax:Object1+Object2
Addition.
ReturnstheresultofaddingObject2toObject1.Theobjectsmaybenumericalvaluesorexpressions
thatreturnnumericalresults.Theobjectsmayalsobelistsormatricesofappropriatedimensions.
Example:3+2returns5

Syntax:Object1Object2
Subtraction.
ReturnstheresultofsubtractingObject2fromObject1.Theobjectsmaybenumericalvaluesor
expressionsthatreturnnumericalresults.Theobjectsmayalsobelistsormatricesofappropriate
dimensions.
Example:32returns1

.*

Syntax:.*(Lst||Mtrx,Lst||Mtrx)
Performsanelementbyelementmultiplicationof2listsor2matrices.
Example:[[1,2],[3,4]].*[[3,4],[5,6]]returns[[3,8],[15,24]]

.+

Syntax:matrix.+real/complexorreal/complex.+matrix
Addsthereal/complextoeachelementofthematrix
Example:[1,2].+3returns[4,5]

Syntax:matrix.real/complexorreal/complex.matrix
Substractthereal/complextoeachelementofthematrix(orthereverceasappropriate)
Example:[3,4].2returns[1,2]

./

Syntax:./(Lst||Mtrx,Lst||Mtrx)
Performsanelementbyelementdivisionof2listsor2matrices.
Example:[[1,2],[3,4]]./[[3,4],[5,6]]returns[[1/3,1/2],[3/5,2/3]]

.^

Syntax:.^(Mtrx,Intg(n))
Calculatesthepowerofeachelementofthematrix.
Example:[[1,2],[3,4]].^3returns[[1,8],[27,64]]

Syntax:Object1/Object2
Division.
ReturnstheresultofdividingObject1byObject2.Theobjectsmaybenumericalvaluesorexpressions
thatreturnnumericalresults.Theobjectsmayalsobelistsormatricesofappropriatedimensions.
Example:32returns1.5

Page1of53

Command

Description

:=

Syntax:variable:=object
Assignsobjecttovariable.
Examples:
A:=3storesthevalue3inthevariableA
F1:=3XmakesF1(X)=3X
M5:=[1,2]storesavectorinM5

<

Syntax:Value1<Value2<:Lessthanorequalto.TestswhetherornotValue1islessthanValue2.Returns
1iftrue,0iffalse.Example:21returns0

<=

Syntax:Value1Value2
:Lessthanorequalto.
TestswhetherornotValue1islessthanValue2.Returns1iftrue,0iffalse.
Example:21returns0
Alternative:<=

<>

Syntax:Value1Value2
:Notequalto.
TestsifValue1isnotequaltoValue2.Returns1iftrue,0iffalse.
Example:35returns1
Alternatives:<>

Syntax:Value1==Value2
==:equalto.
TestsisValue1=Value2.Returns1iftrue,0iffalse.
Example:3==2returns0

==

Syntax:Value1==Value2
==:equalto.
TestsisValue1=Value2.Returns1iftrue,0iffalse.
Example:3==2returns0

>

Syntax:Value1>Value2
>:Greaterthan.
TestswhetherornotValue1isgreaterthanValue2.Returns1iftrue,0iffalse.
Example:2>1returns1

>=

Syntax:Value1Value2
:Greaterthanorequalto.
TestswhetherornotValue1iseithergreaterthanorequaltoValue2.Returns1iftrue,0iffalse.
Example:34returns0
Alternative:>=

Syntax:Value1^Value2
Exponentiation.
ReturnstheresultofraisingValue1tothepowerofValue2.
Example:2^3returns8

Syntax:QUOTE(expression)
Returnstheexpressionunchangedandunevaluated.
ThisfunctionismostlyusedwiththeSTOcommandinordertostoreafunctioninafunctionvariable.
ForexampleifyouwanttostoreSIN(X)inF1.youcannotdoSIN(X)F1asSIN(X)wouldbeevaluatedand
anumericalresultwouldbestoredintoF1.QUOTE(SIN(X))F1willstoreSIN(X)inF1.

a2q

Syntax:a2q(Mtrx,VectVar)
a2q(A,X)=thequadraticformqassociatedtoA,X=vectorofvariables.
Example:a2q([[1,2],[4,4]],[x,y])returnsx^2+6*x*y+4*y^2

abcuv

Syntax:abcuv(Polya,Polyb,Polyc,[Var])
Returns[u,v]suchthatau+bv=cfor3polynomialsa,b,andc.
Example:abcuv(x^2+2*x+1,x^21,x+1)returns[1/2,1/2]

about

Syntax:about(Var(a))
Returnsthehypothesismadewithassumeonthevariablea.
Example:about(n)returnsn

Page2of53

Command

Description

ABS

Syntax:ABS(expr)orABS(matrix)
Fornumericalarguments,returnstheabsolutevalueoftheexpression.Formatrixarguments,returns
thereturnstheFrobenius(Euclidean)normofthearray.
Example:ABS(3.14)returns3.14andABS([[1,2],[3,4]])returns5.47722557505

abscissa

Syntax:abscissa(PntorVect)
Returnstheabscissaofapointoravector.
Example:abscissa(point(1+2*i))returns1

ACOS

Syntax:ACOS(Value)
ACOS:theinversecosinefunction.
ThisShiftkeycombinationreturnstheinversecosineofValue.TheoutputdependsontheAngle
Measuresetting.
Example:ACOS(1)returns3.14159265359

acos2asin

Syntax:acos2asin(Expr)Replacesarccos(x)by/2arcsin(x)intheargumentExpr.Example:
acos2asin(acos(x)+asin(x))returns/2asin(x)+asin(x)

acos2atan

Syntax:acos2atan(Expr)
Replacesarccos(x)by/2arctan(x/(1x^2))intheargument.
Example:acos2atan(2*acos(x))returns2*(/2atan(x/((1x^2))))

ACOSH

Syntax:ACOSH(value)
Inversehyperboliccosine.
Example:ACOSH(1.54308063482)returns1

ACOT

Syntax:ACOT(value)
Arccotangent.ThefunctionderivedfromtheinverseoftheCotangentfunction.
Example:ACOT(1)returns45indegreemode

ACSC

Syntax:ACSC(value)
Arccosecant.ThefunctionderivedfromtheinverseoftheCosecantfunction.
Example:ACSC(1)returns90indegreemode

ADDCOL

Syntax:ADDCOL(matrixname,vector,column_number)
AddColumn.Insertsvaluesfromvectorintoacolumnbeforecolumn_numberinthespecifiedmatrix.
Thesizeofvectormustbethesameasthenumberofrowsinthematrixmatrixname.

additionally

Syntax:additionally(Expr)
Makeanadditionalassumptionaboutavariable.
Example:assume(n,integer);additionally(n>5)returnsDOM_INT,n

ADDROW

Syntax:ADDROW(matrixname,vector,row_number)
AddRow.Insertsvaluesfromvectorintoarowbeforerow_numberinthespecifiedmatrix.Thesizeof
vectormustbethesameasthenumberofcolumnsinthematrixmatrixname.

affix

Syntax:affix(Point)oraffix(Vector)
Returnsthecoordinatesofapointorboththexandylengthsofavectorasacomplexnumber.
Examples:
affix(point(3,2))returns3+2*i
ifGAisapointat(1,2),thenaffix(GA)returns12*i.

algvar

Syntax:algvar(Expr)
Listofthevariablesbyascendingalgebraicextensionorder.
Example:algvar(x+y)returns[[y],[x]]

ALOG

Syntax:ALOG(value)
Thecommonantilogarithm.Thisismoreaccuratethan10^xduetolimitationsofthepowerfunction.
Example:ALOG(2)returns100

alog10

Syntax:alog10(Expr)
Functionx>10^x.
Example:alog10(3)returns1000

altitude

Syntax:altitude(point1,point2,point3)
Giventhreenoncollinearpoints,drawsthealtitudeofthetriangledefinedbythethreepointsthat
passesthroughthefirstpoint.Thetriangledoesnothavetobedrawn.
Example:altitude(A,B,C)drawsalinepassingthroughpointAthatisperpendiculartoBC.

Page3of53

Command

Description

AND

Syntax:Value1ANDValue2
LogicalAND.
Returns1ifbothvalue1andvalue2arenonzero;otherwisereturns0.
Example:3AND2returns1

angle

Syntax:angle(Vertex,Point2,Point3)
Returnsthemeasureofadirectedangle.Thefirstpointistakenasthevertexoftheangleasthenext
twopointsinordergivethemeasureandorientation.
Example:angle(GA,GB,GC)returnsthemeasureofBAC

angleat

Syntax:angleat(Vertex,Point2,Point3,Point4)
UsedinSymbolicview.Giventhethreepointsofanangleandafourthpointasalocation,displaysthe
measureoftheangledefinedbythefirstthreepoints,withalabel,atthelocationinthePlotviewgiven
bythefourthpoint.Thefirstpointisthevertexoftheangle.
Example:angleat(GA,GB,GC,point(0,0))displaysaA=attheorigin,followedbythemeasureofBAC.

angleatraw

Syntax:angleatraw(Pnt(A)),Pnt(B),Pnt(C),(PntorCplx(z0)))angleatraw(A,B,C,z0)displaysatpoint(z0),the
valueofthemeasureoftheangle(AB,AC).

Ans

Syntax:ANS
ANS:Lastanswer.
ReturnstheresultofthelastcalculationmadeinHomeviewtoitsfullprecision.ThevariableANSis
differentfromthenumbersinHome'shistory.AvalueinANSisstoredinternallywiththefullprecisionof
thecalculatedresult,whereasthedisplayednumbersmatchthedisplaymode.

append

Syntax:append((Lst||Seq||Set,Elem)
Appendanelementtoalist.
Example:append([1,2,3],4)returns[1,2,3,4]

apply

Syntax:apply(Fnc(f),Lst(l))
Applythefunctionfattheelementsofthelistl(optionmatrixforamatrix).
Example:apply(x>x^3,[1,2,3])returns[1,8,27]

approx

Syntax:approx(Expr,[Int])
Numericalevaluationofthefirstargument(wecangivethenumberofdigitsassecondargument).
approx(expression)worksalsoanddoesthesamething.
Example:approx(2/3)returns0.666666666667

ARC

Syntax:ARC(G,x,y,r,[[1,2],[color]])
DrawsacircleonGROBG,centeredat(x,y),withradiusr.If1and2arespecified,drawsanarcfrom
1to2usingthecurrentanglemode.

ARC_P

Syntax:ARC_P(G,x,y,r,[[1,2],[color]])
DrawsacircleonGROBG,centeredat(x,y),withradiusr.If1and2arespecified,drawsanarcfrom
1to2usingthecurrentanglemode.

arcLen

Syntax:arcLen(Expr,Real1,Real2)
Returnsthelengthofthearcofacurvebetweentwopointsonthecurve.Thecurveisanexpression,the
independentvariableisdeclared,andthetwopointsaredefinedbyvaluesoftheindependentvariable.
Thiscommandcanalsoacceptaparametricdefinitionofacurve.Inthiscase,theexpressionisalistof2
expressions(thefirstforxandthesecondfory)intermsofathirdindependentvariable.
Examples:
arcLen(x^2,x,2,2)returns9.29.
arcLen({sin(t),cos(t)},t,0,/2)returns1.57

area

Syntax:area(Circle)orarea(Polygon)orarea(Expr,x=value1..value2)
Returnstheareaofacircleorpolygon.Canalsoreturntheareaunderacurvebetweentwopoints.
Examples:
IfGAisdefinedtobetheunitcircle,thenarea(GA)returns.
area(4x^2/4,x=4..4)returns64/3or21.333

areaat

Syntax:areaat(Polygon,Pnt||Cplx(z0))
Displaysatpoint(z0),withalegend,algebraicareaofacircleorofa(star)polygon(e.g.triangle,square,
...)

areaatraw

Syntax:areaatraw(Polygon,Pnt||Cplx(z0))
Displaysatpoint(z0),algebraicareaofacircleorofa(star)polygon(e.g.triangle,square,...).

Page4of53

Command

Description

ARG

Syntax:ARG(x+yi)
TheARGfunctionfindstheangledeterminedbyacomplexnumber.
Example:ARG(3+3i)returns45indegreemode.

ASC

Syntax:ASC("string")
ReturnsavectorcontainingtheASCIIcodesofstring.
Example:ASC("AB")returns[65,66]

ASEC

Syntax:ASEC(value)
Arcsecant.ThefunctionderivedfromtheinverseoftheSecantfunction.
Example:ASEC(1)returns0indegreemode

ASIN

Syntax:ASIN(Value)
ASIN:theinversesinefunction.
ThisShiftkeycombinationreturnstheinversesineofValue.TheoutputdependsontheAngleMeasure
setting.
Example:ASIN(1)returns1.57079632679

asin2acos

Syntax:asin2acos(Expr)Replacesarcsin(x)by/2arccos(x)intheargument.
Example:asin2acos(acos(x)+asin(x))returns/2acos(x)+acos(x)

asin2atan

Syntax:asin2atan(Expr)
Replacesarcsin(x)byarctan(x/(1x^2))intheargument.
Example:asin2atan(2*asin(x))returns2*atan(x/((1x^2)))

ASINH

Syntax:ASINH(value)
Inversehyperbolicsine.
Example:ASINH(1.17520119365)returns1

assume

Syntax:assume(Expr)
Makeanassumptiononavariable.
Example:assume(a>0)returnsa

ATAN

Syntax:ATAN(Value)
ATAN:theinversetangentfunction.
ThisShiftkeycombinationreturnstheinversetangentofValue.TheoutputdependsontheAngle
Measuresetting.
Example:ATAN(0)returns0

atan2acos

Syntax:atan2acos(Expr)
Replacesarctan(x)by/2arccos(x/(1+x^2))intheargument.
Example:atan2acos(atan(2*x)returns/2acos((2*x)/(1+(2*x)^2))

atan2asin

Syntax:atan2asin(Expr)
Replacesarctan(x)byarcsin(x/(1+x^2))intheargumentExpr.
Example:atan2asin(atan(y/x)returnsasin((y/x)/(1+(y/x)^2))

ATANH

Syntax:ATANH(value)
Inversehyperbolictangent.
Example:ATANH(.761594155956)returns1

atrig2ln

Syntax:atrig2ln(Expr)
RewritestheexpressionExprcontaininginversetrigonometricfunctionswithequivalentlogarithmic
functions.
Example:atrig2ln(atan(x))returns(i*ln((i+x)/(ix)))/2

barycenter

Syntax:barycenter([Point1,Weight1],[Point2,Weight2],,[Pointn,Weightn])
Calculatesthehypotheticalcenterofmassofasetofpoints,eachwithagivenweight(arealnumber).
Eachpoint,weightpairisenclosedinsquarebracketsasavector.
Example:barycenter([3,1],[3,1],[4,2])returnspoint(2,0)

basis

Syntax:basis(Lst(vector1,..,vectorn))
Extractabasisfromaspanningsetofvectors.
Example:basis([[1,2,3],[4,5,6],[7,8,9],[10,11,12]])returns[[3,0,3],[0,3,6]]

Page5of53

Command

Description

BEGIN

Syntax:BEGINcommands;END;
Definesasetofcommandstobeexecutedinablock.
ExampleProgramSQM1
EXPORTSQM1(X)
BEGIN
RETURNX^21;
END;
ThisprogramdefinesauserfunctionnamedSQM1(X).FromtheHomeview,enteringSQM1(8)returns
63.

Beta

Syntax:Beta(Expr,Expr)
ReturnsGamma(x)*Gamma(y)/Gamma(x+y).
Example:Beta(3,2)returns1/12

BINOMIAL

Syntax:BINOMIAL(n,k,p)
Binomialprobabilitydensityfunction.Computestheprobabilityofksuccessesoutofntrials,eachwitha
probabilityofsuccess,p.
ReturnsComb(n,k)ifthereisnothirdargument.Notethatnandkareintegerswithk=n.
Example:BINOMIAL(4,2,0.5)returns0.375

BINOMIAL_CDF

Syntax:BINOMIAL_CDF(n,p,k)
Cumulativebinomialdistributionfunction.Returnstheprobabilityofkorfewersuccessesoutofntrials,
withaprobabilityofsuccess,pforeachtrial.Notethatnandkareintegerswithk=n.
Example:BINOMIAL_CDF(4,0.5,2)returns0.6875

BINOMIAL_ICDF

Syntax:BINOMIAL_ICDF(n,p,q)
Inversecumulativebinomialdistributionfunction.Returnsthenumberofsuccesses,k,outofntrials,
eachwithaprobabilityofp,suchthattheprobabilityofkorfewersuccessesisq.
Example:BINOMIAL_ICDF(4,0.5,0.6875)returns2

bisector

Syntax:bisector(Point1,Point2,Point3)Giventhreepoints,createsthebisectoroftheangledefinedby
thethreepointswhosevertexisatthefirstpoint.TheangledoesnothavetobedrawninthePlotview.
Examples:
bisector(GA,GB,GC)drawsthebisectorofBAC.
bisector(0,4i,4)drawsthelinegivenbyy=x

BITAND

Syntax:BITAND(int1[,int2..,intn])
BitwiselogicalAND.TakesnintegersasinputandreturnstheirbitwiselogicalAND.
Example:BITAND(20,13)returns4

BITNOT

Syntax:BITNOT(int)
BitwiselogicalNOT.Takesoneintegerasinputandreturnsitsbitwisenot.

BITOR

Syntax:BITOR(int1[,int2..,intn])
BitwiselogicalOR.TakesnintegersasinputandreturnstheirbitwiselogicalOR.
Example:BITOR(9,26)returns27

BITSL

Syntax:BITSL(int1[,int2])
Bitwiseshiftleft.Takesoneortwointegersasinputandreturnstheresultofshiftingthebitsinthefirst
integertotheleftbythenumberofplacesindicatedbythesecondinteger.Ifthereisnosecondinteger,
thenthebitsinthefirstintegerareshiftedtotheleftoneplace.
Examples:
BITSL(28,2)returns112
BITSL(5)returns10

BITSR

Syntax:BITSR(int1[,int2])
Bitwiseshiftright.Takesoneortwointegersasinputandreturnstheresultofshiftingthebitsinthefirst
integertotherightbythenumberofplacesindicatedbythesecondinteger.Ifthereisnosecond
integer,thenthebitsinthefirstintegerareshiftedtotherightoneplace.
Examples:
BITSR(112,2)returns28
BITSR(10)returns5

BITXOR

Syntax:BITXOR(int1[,int2..,intn])
BitwiselogicalexclusiveOR(XOR).TakesnintegersasinputandreturnstheirbitwiseXOR.
Example:BITXOR(9,26)returns19

Page6of53

Command

Description

black

Syntax:('display')=[color]
Forexample,supposeyouhavedrawnacircleintheGeometryapp.InSymbolicview,thecircle's
definitionmightbeGC:=circle(GA,GBGA).Ifyouwantedthatcircletobe,say,red,youcouldmodifythat
definitiontoread:
Example:GC:=circle(GA,GBGA,('display')=red)

BLIT

Syntax:BLIT([trgtG],[dx1,dy1],[dx2,dy2],srcG,[sx1,sy1],[sx2,sy2],[c])
CopiestheregionofgraphicsrcGbetweenpoint(sx1,sy1)and(sx2,sy2)intotheregionoftrgtGbetween
points(dx1,dy1)and(dx2,dy2).DoesnotcopypixelsfromsrcGthatarecolorc.
Thedefaultsfortheoptionalargumentsare:
trgtG=G0
srcG=G0
sx1,sy1=srcGRBtopleftcorner
sx2,sy2=srcGRBbottomrightcorner
dx1,dx2=trgtGRBtopleftcorner
dx2,dy2=calculatedsodestinationareaisthesameassourcearea
c=allpixelcolors

BLIT_P

Syntax:BLIT_P([trgtG],[dx1,dy1],[dx2,dy2],srcG,[sx1,sy1],[sx2,sy2],[c])
CopiestheregionofgraphicsrcGbetweenpoint(sx1,sy1)and(sx2,sy2)intotheregionoftrgtGbetween
points(dx1,dy1)and(dx2,dy2).DoesnotcopypixelsfromsrcGthatarecolorc.
Thedefaultsfortheoptionalargumentsare:
trgtG=G0
srcG=G0
sx1,sy1=srcGRBtopleftcorner
sx2,sy2=srcGRBbottomrightcorner
dx1,dx2=trgtGRBtopleftcorner
dx2,dy2=calculatedsodestinationareaisthesameassourcearea
c=allpixelcolors

blue

Syntax:('display')=[color]Forexample,supposeyouhavedrawnacircleintheGeometryapp.InSymbolic
view,thecircle'sdefinitionmightbeGC:=circle(GA,GBGA).Ifyouwantedthatcircletobe,say,red,you
couldmodifythatdefinitiontoread:
Example:GC:=circle(GA,GBGA,('display')=red)

bounded_function Argumentreturnedbylimit.Indicatesthatthefunctionisbounded.
BREAK

Syntax:BREAK[n];
Exitsfromexpressionlocalloopstructure.
Example:
FORAFROM1TO10DO
B:=(A+3)MOD5
IFB==1THENBREAK;
END;
END;
Ifnisspecified,allowtoexitnloopstructures.

breakpoint

Syntax:breakpoint(Intg)
Addsabreakpoint.

BR

Syntax:BR(#integer)
Transformanintegerintoarealnumber.

canonical_form

Syntax:canonical_form(Trinom(a*x^2+b*x+c),[Var])
Canonicalformofaseconddegreepolynomial.
Example:canonical_form(2*x^212*x+1)returns2*(x3)^217

CAS

Syntax:CAS(expression)orCAS.function(...)orCAS.variable[(...)]
EvaluteanexpressionorvariableusingtheCAS.
Notethatoutputsinnumericalmodearetransformedintostringsorlistsofexpressionsforsymbolic
matrices.

Page7of53

Command

Description

CASE

Startsa"CASE...END"branchstructure.
Syntax:
CASE
IFtest1THENcommands1END
IFtest2THENcommands2END
...
IFtestNTHENcommandsNEND
[DEFAULT][commandsD]
END;
Evaluatestest1.Iftrue,executescommands1andendstheCASE.Otherwise,evaluatestest2.Iftrue,
executescommands2.Continuesevaluatingtestsuntilatrueisfound.Ifnotruetestisfound,executes
commandsD,ifprovided.

cat

Syntax:cat(SeqObj)
Evaluatesthearguments,thenconcatenatesthemintoastring.
Example:cat("aaa",c,12*3)returns"aaac3"

CEILING

Syntax:CEILING(value)
Leastintegergreaterthanorequaltovalue.
Example:CEILING(3.2)returns4andCEILING(3.2)returns3

center

Syntax:center(Circle)
Returnsthecenterofacircle
Example:center(circle(x^2+y2xy))returnspoint(1/2,1/2)

cFactor

Syntax:cFactor(Expr)
FactorisationoftheexpressioninC(ontheGaussintegersiftherearemorethan2variables).
Example:cFactor(x^2*y+y)returns(x+i)*(xi)*y

CHAR

Syntax:CHAR(listorvector)orCHAR(integer)
ReturnsthestringcorrespondingtotheASCIIcharactercodesinvector,orthesinglecharacter
associatedwithinteger.
Example:CHAR(65)returns"A"andCHAR({82,77,72})returns"RMH"

charpoly

Syntax:charpoly(Mtrx,[Var])
Listofthecoefficientsofthecharacteristicpolynomialofamatrixorcharacteristicpolynomialofamatrix
withthesecondargumentasvariable.
Example:charpoly([[1,2],[3,4]])returnspoly1[1,5,2]

CHECK

Syntax:CHECK(n)Checks(selects)thecorrespondingsymbolicdefinitionfieldinthecurrentapp.The
integernmustbebetween0and9formostapps.ForStatistics1VarandStatistics2Varapps,nmustbe
between1and5.
Forexample,CHECK(3)wouldcheckF3ifthecurrentappisFunction.Thenacheckmarkwouldappear
nexttoF3inSymbolicview,F3wouldbeplottedinPlotview,andevaluatedinNumericview.

chinrem

Syntax:chinrem([Lst||Expr,Lst||Expr],[Lst||Expr,Lst||Expr])
Chineseremainderforpolynomialswrittenasmatrices.
Example:chinrem([[1,2,0],[1,0,1]],[[1,1,0],[1,1,1]])returns[[2,2,1][1,1,2,1,1]].

CHISQUARE

Syntax:CHISQUARE(n,x)
Chisquareprobabilitydensityfunction.ComputestheprobabilitydensityoftheChisquareddistribution
atx,givenndegreesoffreedom.
Example:CHISQUARE(2,3.2)returns0.100948258997

CHISQUARE_CDF

Syntax:CHISQUARE_CDF(n,k)
Cumulative(Chisquared)distributionfunction.Returnsthelowertailprobabilityoftheprobability
densityfunctionforthevaluex,givenndegreesoffreedom.
Example:CHISQUARE_CDF(2,6.1)returns0.952641075609

CHISQUARE_ICDF

Syntax:CHISQUARE_ICDF(n,p)
Inversecumulative(Chisquared)distributionfunction.Returnsthevaluexsuchthatthelowertail
probabilityofx,withndegreesoffreedom,isp.
Example:CHISQUARE_ICDF(2,0.952641075609)returns6.1

cholesky

Syntax:cholesky(Mtrx)
ForanumericalsymmetricmatrixA,returnsLmatrixsuchthatA=L*tran(L).
Example:cholesky([[3,1],[1,4]])returns[[3*3/3,0],[3/3,11/3*33/11]]

Page8of53

Command

Description

CHOOSE

Syntax:CHOOSE(var,title,item1,item2,["item14"])orCHOOSE(var,"title",{"item1"..."itemN")
Displaysachooseboxwiththegiventitleandcontainingitemswiththestrings"item1",etc.Iftheuser
chooseanobject,varwillbeupdatedtocontainthenumberoftheselectedobject(aninteger,1,2,3,
);otherwise,storeszeroinvariftheuserexitswithoutchoosing.
Returnstrue(nonzero)iftheuserselectsanobject,otherwisereturnfalse(0).

chrem

Syntax:chrem(LstIntg(a,b,c....),LstIntg(p,q,r,....))
Chineseremaindersforintegers.
Example:chrem([2,3],[7,5])returns[12,35]

Ci

Syntax:Ci(Expr)
Cosineintegralint(cos(t)/t,t=..x).
Example:Ci(1.0)returns0.337403922901

circle

Syntax:circle(Point1,Point2)orcircle(Point1,Point2Point1)orcircle(equation)
Drawsacircle,giventheendpointsofthediameter,oracenterandradius,oranequationinxandy.
Examples:
circle(GA,GB)drawsthecirclewithdiameterAB.
circle(GA,GBGA)drawsthecirclewithcenteratpointAandradiusAB.
circle(x^2+y^2=1)drawstheunitcircle.
Thiscommandcanalsobeusedtodrawaclockwisearc.
circle(GA,GB,0,/2)drawsaquartercirclewithdiameterAB.

circumcircle

Syntax:circumcircle(Point1,Point2,Point3)
Drawsthecircumcircleofatriangle;thatis,thecirclecircumscribedaboutatriangle.
Example:circumcircle(GA,GB,GC)drawsthecirclecircumscribedaboutABC

coeff

Syntax:coeff(Expr,[Var],[Term])
Returnsthelistofcoefficientsofapolynomialwithrespecttothesecondargumentorthecoefficientof
thetermwhosedegreeisTerm.
Examples:
coeff(x^3+2)returns[1,0,0,2]
coeff(2*y^23,y,0)returns3

col

Syntax:col(Mtrx(A),Intg(n)||Interval(n1..n2))
Returnsthecolumnnorthesequenceofthecolumnsn1...n2ofthematrixA,oroptionalargumentof
count,count_eq,count_inf,count_sup.
Example:col([[1,2,3],[4,5,6],[7,8,9]],1)returns[2,5,8]

colDim

Syntax:coldim(Mtrx)
Numberofcolumnsofamatrix.
Example:coldim([[1,2,3],[4,5,6]])returns3

collect

Syntax:collect(Expror{Expr1,Expr2,...,Exprn})Collectslikestermsinapolynomialexpression(orofalist
ofpolynomialexpressions).
Example:collect(x+2*x+14)returns3*x3

COLNORM

Syntax:COLNORM(matrix)
ColumnNorm.Findsthemaximumvalue(overallcolumns)ofthesumsoftheabsolutevaluesofall
elements
Example:COLNORM([[1,2],[3,4]])returns6

COMB

Syntax:COMB(n,r)
Combinations.Returnsthenumberofcombinations(withoutregardtoorder)ofnthingstakenrata
time:n!/(r!(nr))
Example:COMB(5,2)returns10

comDenom

Syntax:comDenom(Expr,[Var(var)])
Returnstheexpressionafterreductionatthesamedenominator:thenumeratorandthedenominator
aredeveloped[accordingtothepowersofthevariablevar].
Example:comDenom(1/x+1/y^2+1)returns(x*y^2+x+y^2)/(x*y^2)

common_
perpendicular

Syntax:common_perpendicular(Line(D1),Line(D2))
DrawsthecommonperpendicularofthelinesD1andD2.

Page9of53

Command

Description

companion

Syntax:companion(Poly,Var)
Companionmatrixofapolynomial(an=1).
Example:companion(x^2+5x7,x)returns[[0,7],[1,5]]

compare

Syntax:compare(Obj(arg1),Obj(arg2))
Returns1iftype(arg1)<type(arg2)oriftype(arg1)=type(arg2)andarg1<arg2,elsereturns0.
Example:compare(1,2)returns1

complexroot

Syntax:complexroot(Poly(P),Real(l),[Cplx(a)],[Cplx(b)])
Returnsthelistoftheverticesofthesquares(side<=l)containingrootsofP[insidetherectanglewith
opposedverticesaandb]withtheirmulitiplicity.
Example:complexroot(x^52*x^4+x^3+i,0.1)returns[[[(2112*i)/32,(189*i)/32],1],[[(615*i)/16,(6
21*i)/(1616*i)],1],[[(27+18*i)/(16+16*i),(243*i)/16],1],[[(6+27*i)/(16+16*i),(9+6*i)/8],1],[[(
15+6*i)/(16+16*i),(3+12*i)/16],1]]

CONCAT

Syntax:CONCAT(value1,value2,[..value16])
Concatenation.Concatenates(joins)itemsintoalist.
Example:CONCAT({1,2,3},4)returns{1,2,3,4}andCONCAT(1,2,3,4)returns{1,2,3,4}

COND

Syntax:COND(matrix)
ConditionNumber.Findsthe1norm(columnnorm)ofasquarematrix.
Example:COND([[1,2],[3,4]])returns21

conic

Syntax:conic(Expr)
Plotsthegraphofaconicsectiondefinedbyanexpressioninxandy.
Example:conic(x^2+y^281)drawsacirclewithcenterat(0,0)andradiusof9

CONJ

Syntax:CONJ(x+yi)
ComplexConjugate.Reversesthesignoftheimaginarypartofacomplexnumber.
Example:CONJ(3+4i)returns34i

contains

Syntax:contains((Lst(l)orSet(l)),Elem(e))
Testsifasetcontainsanexpression(returnstheindex+1or0).
Example:contains(%{0,1,2,3%},2)returns3

content

Syntax:content(Poly,[Var])
ReturnsthegcdofthecoefficientsofthepolynomialPoly.
Example:content(2*x^2+10*x+6)returns2

CONTINUE

SyntaxCONTINUE[n];
Transfersexecutioninalooptothestartofthenextiterationofthenthupperloop(defaultcurrent
loop).

CONVERT

Syntax:CONVERT(Value_Unit1,1_Unit2)
ConvertsValueinUnit1tothecorrespondingvalueincompatibleUnit2.
Example:CONVERT(20_m,1_ft)returns65.6167979003_ft
Alternative:20_m_ft

convexhull

Syntax:convexhull(Lst)
Convexhullofalistof2Dpoints.
Example:convexhull(0,1,1+i,1+2i,1i,13i,2+i)returns13*i,1+2*i,2+i,1i

coordinates

Syntax:coordinates(PntorCplxorVect)
Returnsthelist(respmatrix)oftheabscissaandoftheordinateofapointoravector(respofpointsor
vectors).
Example:coordinates(point(1+2*i))returns[1,2]

CopyVar

Syntax:CopyVar(Var(var1),Var(var2))Copythestoragewithoutevaluationofvar1intovar2.

correlation

Syntax:correlation(Lst||Mtrx,[Lst])
Returnsthecorrelationoftheelementsofitsargument.
Example:correlation([[1,2],[1,1],[4,7]])returns33/(6*31)

COS

COS:thecosinefunction.
Syntax:COS(Value)
ReturnsthecosineofValue.Valueisinterpretedaseitherdegreesorradians,dependingonthesetting
ofAngleMeasureinHomeModesorSymbolicSetup.
Example:inradianmode,COS()returns1.

Page10of53

Command

Description

cos2sintan

Syntax:cos2sintan(Expr)
Replacescos(x)bysin(x)/tan(x)intheargument.
Example:cos2sintan(cos(x))returnssin(x)/tan(x)

COSH

Syntax:COSH(value)
Hyperboliccosine.
Example:ASINH(1.17520119365)returns1

COT

Syntax:COT(value)
Cotangent.TheCotangentfunction;thatis,cos(x)/sin(x).
Example:COT(45)returns1indegreemode

count

Syntax:count(Fnc(f),(Lst||Mtrx)(l),[Opt(row||col)])
Returnsf(l[0])+f(l[1])+...+f(l[size(l)1]).
Example:count((x)>x,[2,12,45,3,7,78])returns147

covariance

Syntax:covariance(Lst||Mtrx,[Lst])
Returnsthecovarianceoftheelementsofitsargument.
Example:covariance([[1,2],[1,1],[4,7]])returns11/3

covariance_
correlation

Syntax:covariance_correlation(Lst||Mtrx,[Lst])
Returnsthelistofthecovarianceandthecorrelationoftheelementsofitsargument.
Example:covariance_correlation([[1,2],[1,1],[4,7]])returns[11/3,33/(6*31)]

cpartfrac

Syntax:cpartfrac(RatFrac)
PerformspartialfractiondecompositioninCofafraction.
Example:cpartfrac((x)/(4x^2))returns1/((x2)*2)+1/((x+2)*2)

crationalroot

Syntax:crationalroot(Poly(P))
ReturnsthelistofcomplexrationalrootsofPwithoutindicatingthemultiplicity.
Example:crationalroot(2*x^3+(57*i)*x^2+(4+14*i)*x+84*i)returns[(3+i)/2,2*i,1+i]

CROSS

Syntax:CROSS(vector1,vector2)
CrossProduct.Findsthecrossproductofvector1withvector2.
Example:CROSS([1,2],[3,4])returns[0,0,2]

CSC

Syntax:CSC(value)
Cosecant.TheCosecantfunction;thatis,1/sin(x)
Example:CSC(90)returns0indegreemode

cSolve

Syntax:csolve(Eq,Var)
Returnsthesolutions,includingcomlexsolutions,ofEq,forVar.IfEqisanexpression,solvesEq=0.
Example:csolve(x^4=1,x)returns{1,1,i,i}

cumSum

Syntax:cumSum(Lst(l)||Seq||Str)
Returnsthelist(orthesequenceorthestring)lrwheretheelementsarethecumulativesumofthelist
l:lr[k]=sum(l[j],j=0..k)(orlr=sum(l[j],j=0..k)$(k=0..size(l)1)).
Example:cumSum([0,1,2,3,4])returns[0,1,3,6,10]

curl

Syntax:curl(Lst(A,B,C),Lst(x,y,z))
Returnsthecurlofavector.curl([A,B,C],[x,y,z])=[dC/dydB/dz,dA/dzdC/dx,dB/dxdA/dy].
Example:curl([2*x*y,x*z,y*z],[x,y,z])returns[zx,0,z2*x]

curve

Syntax:curve(Expr)
Reservedword.

cyan

Syntax:('display')=[color]
Forexample,supposeyouhavedrawnacircleintheGeometryapp.InSymbolicview,thecircle's
definitionmightbeGC:=circle(GA,GBGA).Ifyouwantedthatcircletobe,say,red,youcouldmodifythat
definitiontoread:
Example:GC:=circle(GA,GBGA,('display')=red)

cyclotomic

Syntax:cyclotomic(Expr)
Generatesavectorrepresentingthenthcyclotomicpolynomial.
Example:cyclotomic(20)returns[1,0,1,0,1,0,1,0,1]

Page11of53

Command

Description

cZeros

Syntax:cZeros(Expr,[Var])orcZeros(ListExpr,ListVar)Returnstheroots,includingcomplexroots,ofExpr
(thatis,thesolutionofXpr=0)orthematrixwherethelinesarethesolutionsofthesystem:
Expr1=0,Expr2=0....
Example:cZeros(x^41)returns[1,1,i,i]

CPX

Syntax:CPX(x,y)orCPX({x,y})
Transformcartesiancoordinatesintopixelcoordinates.Returnsalist.

DEBUG

Executesaprogramindebugmode.
Syntax:DEBUG(ProgramName(arguments))

degree

Syntax:degree(Poly)
ReturnsthedegreeofthepolynomialPoly.
Example:degree(x^4+x)returns3

DELCOL

Syntax:DELCOL(matrixname,column_number)
DeleteColumn.Deletesthecolumncolumn_numberfromthematrixmatrixname.

delcols

Syntax:delcols(Mtrx(A),Interval(n1..n2)||n1)
Returnsthematrixwherethecolumnsn1..n2(orn1)ofthematrixAaredeleted.
Example:delcols([[1,2,3],[4,5,6],[7,8,9]],1..1)returns[[1,3],[4,6],[7,9]]

DELROW

Syntax:DELROW(matrixname,row_number)
DeleteRow.Deletestherowrow_numberfromthematrixmatrixname.

delrows

Syntax:delrows(Mtrx(A),Interval(n1..n2)||n1)
Returnsthematrixwheretherowsn1..n2(orn1)ofthematrixAaredeleted.
Example:delrows([[1,2,3],[4,5,6],[7,8,9]],1..1)returns[[1,2,3],[7,8,9]]

deltalist

Syntax:deltalist(Lst)
Returnsthelistofthedifferenceoftwotermsinsuccession.
Example:deltalist([1,4,8,9])returns[3,4,1]

denom

Syntax:denom(a/b)
SimplifiedDenominator.Fortheintegersaandb,returnsthedenominatorofthefractiona/bafter
simplification.
Example:denom(10/12)returns6

desolve

Syntax:desolve(Eq,[TimeVar],Var)
Solvesadifferentialequation.
Example:desolve(y''+y=0,y)returnsG_0*cos(x)+G_1*sin(x)

DET

Syntax:DET(matrix)
Determinantofasquarematrix.
Example:DET([[1,2],[3,4]])returns2

diag

Syntax:diag(Lst(l)||Mtrx(A))
ReturnseitherthediagonalmatrixwithdiagonallorthediagonalofA.
Example:diag([1,2],[3,4])returns[1,4]

diff

Syntax:diff(Expr,[VarorListVar])
Returnsthederivativeofanexpressionwithrespecttoagivenvariable.Youcanusethedifferentiation
templateintheTemplatemenuaswell.
Examples:
diff(x^3x)returns3*x^21
diff(sin(x)cos(y),x)returnscos(x)
diff(sin(x)cos(y),y)returnssin(y)

DIFFERENCE

Syntax:DIFFERENCE({list1},...{listN})
Returnsalistoftheelementsthatarenotcommonbetween2ormoreofthelists.
Example:DIFFERENCE({1,2,3},{2,4,8})returns{1,3,4,8}

DIM

Syntax:DIM(string)
Returnsthenumberofcharactersinstring.
Example:DIM("12345")returns5

Page12of53

Command

Description

DIMGROB

Syntax:DIMGROB(G,w,h,[color])orDIMGROB(G,w,h,list)
SetsthedimensionsofGROBGtow*h.InitializesthegraphicGwithcolororwiththegraphicdata
providedinlist.Ifthegraphicisinitializedusinggraphicdata,thenlistisalistofintegers.Eachinteger,as
seeninbase16,describesonecolorevery16bits.
ColorsareinA1R5G5B5format(ie,1bitforalphachannel,and5bitsforR,GandB).

DIMGROB_P

Syntax:DIMGROB_P(G,w,h,[color])orDIMGROB(G,list)
SetsthedimensionsofGROBGtow*h.InitializesthegraphicGwithcolororwiththegraphicdata
providedinlist.Ifthegraphicisinitializedusinggraphicdata,thenlistisalistofintegers.Eachinteger,as
seeninbase16,describesonecolorevery16bits.
ColorsareinA1R5G5B5format(ie,1bitforalphachannel,and5bitsforR,GandB).

Dirac

Syntax:Dirac(Real)
FunctionderivativeofHeaviside.
Example:Dirac(1)returns0

distance

Syntax:distance((PntorCplx),(PntorCplxorCurve))Calculatesthedistancebetween2points,orapoint
andacurve.
Example:distance(0,1+i)returns2

distance2

Syntax:distance2(point1,point2)ordistance2(point,curve)
Returnsthesquareofthedistancebetweentwopointsorbetweenapointandacurve.
Example:distance2(1+i,3+3i)returns8.ifGAisthepointat(0,0)andGBisdefinedasplotfunc(4x^2/4),
thendistance(GA,GB)returns12.

distanceat

Syntax:distanceat(GeoObj(A),GeoObj(B),(PntorCplx))
distanceat(A,B,z0)displaysatpoint(z0),withalegend,thedistancebetween2geometricalobjects.
Example:A:=point(0);B:=point(1+i);distanceat(A,B,(1+i)/2))returns2

distanceatraw

Syntax:distanceatraw(Point1,Point2,Point3)ordistanceatraw(Point1,Curve,Point3)
ThiscommandisusedinSymbolicview.Similartodistanceat(),thiscommmandreturnsthedistance
betweentwopointsorbetweenapointandacurveandplacesthatmeasurementatthelocationof
Point3inthePlotview.Thedistanceisunlabeled.
Examples
distanceatraw(1+I,3+3i,point(0,0))returns2.828or22andplacesthatmeasureattheorigininPlot
view.
IfGAisthepointat(0,0)andGBisdefinedasplotfunc(4x^2/4),thendistanceat(GA,GB,GA)returns
3.464or23andplacesthismeasureinPlotviewat(0,0).
DefineA:=point(0)andB:=point(1+i);thendistanceatraw(A,B,(1+i)/2))returns2andplacesthis
measurementat(1/2,1/2)

divergence

Syntax:divergence(Lst(A,B,C),Lst(x,y,z))
Returnsthedivergenceofavector.divergence([A,B,C],[x,y,z])=dA/dx+dB/dy+dC/dz.
Example:divergence([x^2+y,x+z+y,z^3+x^2],[x,y,z])returns2*x+3*z^2+1

divis

Syntax:divis(Poly(P)orLstPoly)
Returnsthelistofdivisorsofapolynomial.
Example:divis(x^21)returns[1,x1,x+1,(x1)*(x+1)]

division_
point

Syntax:division_point(Point1,Point2,Realk)ordivision_point(Cplx1,Cplx2,Cplxk)
FortwopointsAandB,andanumericalfactork,returnsapointCsuchthatCB=k*(CA).Thetwopoints
maybereferencedbynameorrepresentedbyacomplexnumber.
Example:division_point(0,6+6*i,4)returnspoint(8,8)

divpc

Syntax:divpc(Poly1,Poly2,Integer)
ReturnsthendegreeTaylorpolynomialforthequotientof2polynomials.
Example:divpc(x^4+x+2,x^2+1,5)returnsthe5thdegreepolynomialx^5+3*x^4x^32*x^2+x+2

DO

Syntax:FORvarFROMstartTO(orDOWNTO)finish[STEPincrement]DOcommand(s)END;
Setsvariablevartostart;then,foraslongasthisvariablesvalueislessthanorequalto(ormorethan
foraDOWNTO)finish,executescommand(s)andadds(orsubstractforDOWNTO)1(orincrement)to
var.
FORAFROM1TO10STEP2
DO
PRINT(A);
END;
willprint13579

Page13of53

Command

Description

DOT

Syntax:DOT(matrix1,matrix2)
DotProduct.Findsthedotproductoftwoarrays,matrix1andmatrix2.
Example:DOT([1,2],[3,4])returns11

DRAWMENU

Syntax:DRAWMENU({text...})orDRAWMENU(text..)
Drawamenucontainingtheitemsspecified

DrawSlp

Syntax:DrawSlp(Reala,Realb,Realm)
Giventhreerealnumbersm,a,b,drawsalinewithslopemthatpassesthroughthepoint(a,b).
Example:DrawSlp(2,1,3)drawsthelinegivenbyy=3x5

Syntax:e
Naturallogarithmbase,internallyrepresentedas2.71828182846

EDITLIST

Syntax:EDITLIST(listname)
StartstheListEditoranddisplaysthespecifiedlist.Ifusedinprogramming,returnstotheprogramwhen
userpressesOK(menukey).
Example:EDITLIST(L1)editslistL1.

EDITMAT

Syntax:EDITMAT(matrixname)StartstheMatrixEditoranddisplaysthespecifiedmatrix.Ifusedin
programming,returnstotheprogramwhenuserpressesOK(menukey).ExampleEDITMAT(M1)edits
matrixM1.

egcd

Syntax:egcd((PolyorLst),(PolyorLst),[Var])
Returnstheextendedgreatestcommondivisorof2polynomials.
Example:egcd((x1)^2,x^31)returns[x2,1,3*x3]

Ei

Syntax:Ei(Expr)
Exponentialintegralint(exp(t)/t,t=..x)
Example:Ei(1.0)returns1.89511781636

EIGENVAL

Syntax:EIGENVAL(matrix)
Displaystheeigenvaluesinvectorformformatrix.
Example:EIGENVAL([[1,2],[3,4]])returns[5.37228132327.372281323269]

eigenvals

Syntax:eigenvals(Mtrx)
Returnsthesequenceofthe(calculable)eigenvaluesofamatrix.
Example:eigenvals([[2,2,1],[2,1,2],[1,2,2]])returns3,3,3

eigenvects

Syntax:eigenvects(Mtrx)
Computestheeigenvectorsofadiagonalizablematrix.
Example:eigenvects([[2,2,1],[2,1,2],[1,2,2]])returns[[1,3,3],[2,0,3],[1,3,3]]

EIGENVV

Syntax:EIGENVV(matrix)
EigenvectorsandEigenvaluesforasquarematrix.Displaysalistoftwoarrays.Thefirstcontainsthe
eigenvectorsandthesecondcontainstheeigenvalues.
Example:EIGENVV([[1,2],[3,4]])returns{[[eigenvectors]],[[eigenvalues]]}

eigVc

Syntax:eigVc(Mtrx)
Computestheeigenvectorsofadiagonalizablematrix.
Example:eigVc([[2,2,1],[2,1,2],[1,2,2]])returns[[1,3,3],[2,0,3],[1,3,3]]

eigVl

Syntax:eigVl(Mtrx(A))
ReturnstheJordanmatrixassociatedtoAwhentheeigenvaluesarecalculable.
Example:eigVl([[4,1],[4,0]])returns[[2,1],[0,2]]

element

Syntax:element(object,real)orelement(real1..real2)
Createsapointonageometricobjectwhoseabscissaisagivenvalueorcreatesarealvalueonagiven
interval.
Examples:
element(plotfunc(x^2),2)createsapointonthegraphofy=x^2.Initially,thispointwillappearat(
2,4).Youcanmovethepoint,butitwillalwaysremainonthegraphofitsfunction.
element(0..5)createsavalueof2.5initially.TappingonthisvalueandpressingEnterenablesyouto
pressacursorkeytoincreaseordecreasethevalueinamannersimilartoasliderbar.PressEnteragain
toclosethesliderbar.Thevalueyousetcanbeusedasacoefficientinafunctionyousubsequentlyplot.

Page14of53

Command

Description

ellipse

Syntax:ellipse(Point1,Point2,Point3)orellipse(Point1,Point2,Realk)
Drawsanellipse,giventhefociandeitherapointontheellipseorascalarthatisonehalftheconstant
sumofthedistancesfromapointontheellipsetoeachofthefoci.
Examples:
ellipse(GA,GB,GC)drawstheellipsewhosefociarepointsAandBandwhichpassesthroughpointC.
ellipse(GA,GB,3)drawsanellipsewhosefociarepointsAandB.ForanypointPontheellipse,AP+BP=6.

ELSE

Startsan"IF...THEN...END"or"IF...THEN...ELSE...END"branchstructure.
Syntax:IFtestTHENcommand(s)[ELSEcommands]END;
Evaluatestest.Iftestistrue(non0),executescommand(s);otherwise,executesthecomandsintheELSE
clausenothinghappens.
IFA<1
THENPRINT("AISSMALLERTHAN1");
ELSEPRINT("AISLARGERTHAN1");
END;

END

Endsastructure,eitherablock,atest,alooporabranch.

equation

Syntax:equation(curve)orequation(point)ReturnstheCartesianequationofacurveinxandy,orthe
Cartesiancoordinatesofapoint.
Examples:
equation(line(1i,i))returnsy=2*x+1
IfGAisthepointat(0,0),GBisthepointat(1,0),andGCisdefinedascircle(GA,GBGA),then
equation(GC)returnsx^2+y^2=1.

equilateral_
triangle

Syntax:equilateral_triangle(Point1,Point2,[Var])
Drawsanequilateraltriangledefinedbyoneofitssides;thatis,bytwoconsecutivevertices.Thethird
pointiscalculatedautomatically,butisnotdefinedsymbolically.Ifalowercasevariableisaddedasa
thirdargument,thenthethirdpointislabeledwiththevariablenameandthecoordinatesofthethird
pointarestoredinthatvariable.Theorientationofthetriangleiscounterclockwisefromthefirstpoint.
Example:equilateral_triangle(point(0,0),point(1,0))drawstheequilateraltranglethroughthepointsat
(0,0),(1,0),and(1/2,3/2).

erf

Syntax:erf(Real(x0))
Returnstheapproximatevalueof2/*int(exp(t^2),t,0,x0)
Example:erf(1)returns0.84270079295

erfc

Syntax:erfc(Real(x0))
Returnstheapproximatevalueof2/*int(exp(t^2),t,x0,).
Example:erfc(1)returns0.15729920705

euler

Syntax:euler(x);
Eulersphi(ortotient)function.Takesapositiveintegerxandreturnsthenumberofpositiveintegers
lessthanorequaltoxthatarecoprimetox.
Example:euler(6)returns2

EVAL

Syntax:EVAL(expression)
Evaluatestheexpression.UsefullinprogramswhereparametersarepassednonevaluatedwithQUOTE

evalc

Syntax:evalc(Expr)
Returnsacomplexexpressionsimplifiedwiththeformatreal+i*imag
Example:evalc(1/(x+y*i))returnsx/(x^2+y^2)+(i)*(y)/(x^2+y^2)

evalf

Syntax:evalf(Expr,[Int])
Numericalevaluationofthefirstargument(wecangivethenumberofdigitsassecondargument).
approx(expression)worksalsoanddoesthesamething.
Example:evalf(2/3)returns0.666666666667

even

Syntax:even(Intg(n))
Returns1iftheintegeriseven,elsereturns0.
Example:even(6)returns1

exact

Syntax:exact(Expr)
Convertstheexpressiontoarationalorrealexpression.
Example:exact(1.4141)returns14141/10000

Page15of53

Command

Description

exbisector

Syntax:exbisector(Point1,Point2,Point3)
Giventhreepointsthatdefineatriangle,createsthebisectoroftheexterioranglesofthetrianglewhose
commonvertexisatthefirstpoint.ThetriangledoesnothavetobedrawninthePlotview.
Examples:
exbisector(GA,GB,GC)drawsthebisectoroftheexterioranglesofABCwhosecommonvertexisat
pointA.
exbisector(0,4i,4)drawsthelinegivenbyy=x

excircle

Syntax:excircle(Point1,Point2,Point3)
excircle(A,B,C)drawstheAexcircleoftheABCtriangle.
Drawsoneoftheexcirclesofatriangle,acircletangenttoonesideofthetriangleandalsotangentto
theextensionsoftheothertwosides.
Example:excircle(GA,GB,GC)drawsthecircletangenttoBCandtotheraysABandAC.

EXECON

Syntax:EXECON("expressionwith&",listsormatrices)Returnsamatrixorlistcomposedoftheresultof
theevaluationoftheexpressionafterreplacementof&byeachitemintheinput.Example:
EXECON("&1+1",{1,2,3})returns{2,3,4}IfEXECONhasonly1listormatrixinput,using&followedbya
numberA(between1and9)willreplace&Abytheelementi+A1oftheinput.Example:EXECON("&2
&1",{1,4,3,5}")returns{3,1,2}thedifferencebetween2successiveelements.IfEXECONhas2or
morelistsormatricesinput,using&followedbyanumberA(between1and9)willreplace&1bythe
elementfromtheAthinput.
Example:EXECON("&1+&2",{1,2,3},{4,5,6})returns{5,7,9}IfEXECONhas2ormorelistsormatricesas
input,using&followedby2numbersAandB(between1and9)willreaplace&ABbytheelementi+B1
oftheAthinput.Example:EXECON("&22&1",{1,2,3},{4,5,6,7})returns{4,4,4}Notethatformatrixinput,
theelementsaretreatedasifthematrixwasavector.

EXP

Syntax:EXP(value)
Thenaturalexponential.Thisismoreaccuratethane^xduetolimitationsofthepowerfunction.

exp2pow

Syntax:exp2pow(Expr)
Transformsanexpressionoftheformexp(n*ln(x))tox^n.
Example:exp2pow(exp(3*ln(x)))returnsx^3

exp2trig

Syntax:exp2trig(Expr)
Transformsthecomplexexponentialintosineandcosine.
Example:exp2trig(exp(i*x))returnscos(x)i*sin(x)

expand

Syntax:expand(Expr)
Fulldistributionofmultiplicationanddivisionoveradditionandsubtraction.
Example:expand((x+y)*(z+1))returnsy*z+x*z+y+x

expexpand

Syntax:expexpand(Expr)
Expandsexponentialsusinngtheidentityexp(a*f(x))=(exp(f(x)))^a.
Example:expexpand(exp(3*x))returnsexp(x)^3

EXPM1

Syntax:EXPM1(value)
Exponentminus1.ThisismoreaccuratethanEXPwhenxisclosetozero.
Example:EXPM1(.23)returns.258600009929

exponential_
regression

Syntax:exponential_regression(Lst||Mtrx(A),[Lst])
Returnsthecoefficients(a,b)ofy=b*a^x:itisthebestexponentialthatapproximatesthepointswhere
thecoordinatesaretherowsofA(orthe2lists).
Example:exponential_regression([[1.0,2.0],[0.0,1.0],[4.0,7.0]])returns1.60092225473,1.10008339351

EXPORT

Syntax:
Variabledeclaration:EXPORTvar_1[:=value][,morevariables];
forwardfunctiondeclaration:EXPORTfunction(params);
Normalfunctiondeclaration:orEXPORTfunction[(params)]
BEGIN
END;
Inaprogram,declaresalistofexportedvariableoranexportedfunction.

EXPR

Syntax:EXPR(string)
Parsesstringintoanumberorexpression.
Example:EXPR("2+3")returns5

Page16of53

Command

Description

extract_measure

Syntax:extract_measure(Var)
Returnsthedefinitionofageometricobject.Forapoint,thatdefinitionconsistsofthecoordinatesofthe
point.Forotherobjects,thedefinitionmirrorstheirdefinitioninSymbolicview,withthecoordinatesof
theirdefiningpointssupplied.
Examples:
extract_measure(angleatraw(0,1,1+i,1)
extract_measure(distanceatraw(0,1+i,(1+i)/2))returns2

ezgcd

Syntax:ezgcd(Poly,Poly)
ReturnstheGCDof2polynomialswithatleast2variables,withtheezgcdalgorithm.
Example:ezgcd(x^2+3*xxy3*y,x^2y^2)returnsxy

f2nd

Syntax:f2nd(FracorRatFrac)
Returnsthelistbuiltwiththenumeratorandthedenominatorofthesimplifiedfraction.
Example:f2nd(42/12)returns[7,2]

factor

Syntax:factor(Expr)Factorizesapolynomial.Example:factor(x^41)returns(x1)*(x+1)*(x^2+1)

factor_xn

Syntax:factor_xn(Poly)
Factorizesx^ninP\thepolynomialPoly(n=degreeofpolynomialP).
Example:factor_xn(x^41)returnsx^4*(1x^4)

factorial

Syntax:factorial(Intg(n)||Real(a))
factorial(n)=n!.Fornonintegers,factorial(a)=a!=G(a+1).ThiscalculatestheGammafunction.
Example:factorial(4)returns24

factors

Syntax:factors(Poly)orfactors({Poly1,Poly2,...,Polyn})
Returnsthelistofprimefactorsofapolynomial;eachfactorfollowedbyitsmultiplicity.
Example:factors(x^41)returns[x1,1,x+1,1,x^2+1,1]

fcoeff

Syntax:fcoeff(Root1,Oder1,Root2,Order2,...,Rootn,Ordern)
Returnsthepolynomialdescribedbyalistofroots,eachfollowedbyitsorder.
Example:fcoeff([1,2,0,1,3,1])returns((x1)^2)*x*(x3)^1

fft

Syntax:fft(Vector(Vect(L),Intg(a),Intg(p))
FastFourierTransforminRorinthefieldZ/pZ,withaasprimitiventhrootof1(n=size(L)).
Example:fft([1,2,3,4,0,0,0,0])returns[10.0,0.4142135623737.24264068712*(i),
2.0+2.0*i,2.414213562371.24264068712*i,2.0,2.41421356237+1.24264068712*i,2.02.0*i]

FILLPOLY

Syntax:FILLPOLY([G],{coordinates...}or[Coordinates],Color,[Alpha])
FillsthepolygonspecifiedbytheprovidedCartsiancoordinatesusingthecolorprovided.
IfAlpha(0to255)isprovided,thepolygonisdrawnwithtrensparency.
Example:FILLPOLY([(0,0),(1,1),(2,0),(3,1),(2,2)],#FF,128)

FILLPOLY_P

Syntax:FILLPOLY_P([G],{coordinates...}or[Coordinates],Color,[Alpha])
Fillsthepolygonspecifiedbytheprovidedpixelcoordinatesusingthecolorprovided.
IfAlpha(0to255)isprovided,thepolygonisdrawnwithtrensparency.
Example:FILLPOLY_P([(20,20),(120,120),(150,20),(180,150),(50,100)],#FF,128)

FISHER

Syntax:FISHER(n,d,x)
F(FisherorFisherSnedecor)probabilitydensityfunction.Computestheprobabilitydensityatthevalue
x,givennumeratornanddenominatorddegreesoffreedom.
Example:FISHER(5,5,2)returns0.158080231095

FISHER_CDF

Syntax:FISHER_CDF(n,d,x)
CumulativeF(FisherorFisherSnedecor)distributionfunction.ReturnsthelowertailprobabilityoftheF
probabilitydensityfunctionforthevaluex,givennumeratornanddenominatorddegreesoffreedom.
Example:FISHER_CDF(5,5,2)returns0.76748868087

FISHER_ICDF

Syntax:FISHER_ICDF(n,d,p)
InversecumulativeF(FisherorFisherSnedecor)distributionfunction.ReturnsthevaluexsuchthattheF
lowertailprobabilityofx,withnumerator,nanddenominator,ddegreesoffreedom,isp.
Example:FISHER_ICDF(5,5,0.76748868087)returns2

FLOOR

Syntax:FLOOR(value)
Greatestintegerlessthanorequaltovalue.
Example:FLOOR(3.2)returns4

Page17of53

Command

Description

fMax

Syntax:fMax(Expr,[Var])
Returnstheabscissaofthemaximumoftheexpression.
Example:fMax(x^2+2*x+1,x)returns1

fMin

Syntax:fMin(Expr,[Var])
Returnstheabscissaoftheminimumoftheexpression.
Example:fMin(x^22*x+1,x)returns1

FNROOT

Syntax:FNROOT(expression,variable,[guess],[guess2])
Functionrootfinder(liketheSolveapp).Findsthevalueforvariableatwhichexpressionmostnearly
evaluatestozero.Usesguessasinitialestimate.
Example:FNROOT(M*9.8/6001,M,1)returns61.2244897959

FOR

Syntax:FORvarFROMstartTO(orDOWNTO)finish[STEPincrement]DOcommand(s)END;Setsvariable
vartostart;then,foraslongasthisvariablesvalueislessthanorequalto(ormorethanforaDOWNTO)
finish,executescommand(s)andadds(orsubstractforDOWNTO)1(orincrement)tovar.FORAFROM1
TO10STEP2DOPRINT(A);END;willprint13579

format

Syntax:format(Real,Str("f4"||"s5"||"e6"))
Transformstherealintoastringwiththeindicatedformat(f=float,s=scientific,e=engineering).
Example:format(9.3456,"s3")returns9.35

FP

Syntax:FP(value)
ReturnstheFractionalpartofvalue.
Example:FP(23.2)returns.2

fracmod

Syntax:fracmod(Expr(Xpr),Intg(n))
Returnsthefractiona/bsuchasa/b=Xprmodn,n/2<a<=n/2and0<=b<n/2
Example:fracmod(41,121)returns2/3

FREEZE

Syntax:FREEZE
Preventsthescreenfrombeingredrawnaftertheprogramends.Leavesthemodifieddisplayonthe
screenfortheusertosee.

froot

Syntax:froot(RatPoly(F))
ReturnsthelistofrootsandpolesofFwiththeirmulitiplicity.
Example:froot((x^52*x^4+x^3)/(x3))returns[0,3,1,2,3,1]

fsolve

Syntax:fsolve(Expr,Var,[GuessorInterval],[Method])
Numericalsolutionofanequationorasystemofequations.
Example:fsolve(cos(x)=x,x,1..1)returns[0.739085133215]

function_diff

Syntax:function_diff(Fnc(f))
Returnsthederivativefunctionofthefunctionf.
Example:function_diff(sin)returns(`x`)>cos(`x`)

Gamma

Syntax:Gamma(Real(x0))
CalculusofGammaatapointx0(Gamma(n+1)=n!forninteger).
Example:Gamma(5)returns24

gauss

Syntax:gauss(Expr,VectVar)
Splitsaquadraticformasasum/differenceofsquare.
Example:gauss(x^2+2*a*x*y,[x,y])returns(a*y+x)^2+(y^2)*a^2

gbasis

Syntax:gbasis(ListPoly,ListVar)
ReturnstheGroebnerbasisoftheidealspannedbythelistofpolynomials.
Example:gbasis({x^2y^3,x+y^2},{x,y})returns[y^4y^3,x+y^2]

gcd

Syntax:gcd(Poly1,Poly2)
Returnsthegreatestcommondivisorof2polynomialsofseveralvariables.Canalsobeusedasinteger
gcd.
Examples:
gcd(x^24,x^25*x+6)returnsx2
gcd(45,30)returns15

GETBASE

Syntax:GETBASE(#integer)
Returnsthebaseusedfordisplayforthisinteger.
0:system,1:bin,2:oct,3:dec,4:hex

Page18of53

Command

Description

GETBITS

Syntax:GETBITS(#integer)
Returnsthenumberofbitsusedforcalculationswiththisinteger.

GETKEY

Syntax:GETKEYReturnstheIDofthefirstkeyinthekeyboardbuffer,or1ifnokeywaspressedsince
thelastcalltoGETKEY.KeyIDsareintegersfrom0to50,numberedfromtopleft(key0)tobottomright
(key50).0=Apps1=Symb2=Up3=Help4=Esc5=Home6=Plot7=Left8=Right9=View10=Cas11=Num12=
Down13=MenuAfterthat,thekeysarenumberfromtopleft(14=Vars)tobottomright(50=+)

GETPIX

Syntax:GETPIX([G],x,y)
ReturnsthecolorofthepixelofGwithcoordinates(x,y).

GETPIX_P

Syntax:GETPIX_P([G],x,y)
ReturnsthecolorofthepixelofGwithcoordinates(x,y).

GF

Syntax:GF(Intg(p),Intg(n))
CreatesaGaloisFieldofcharacteristicpwithp^nelements.
Example:GF(5,9)returnsGF(5,k^9k^8+2*k^7+2*k^5k^2+2*k2,[k,K,g],undef)

grad

Syntax:grad(Expr,ListVars)
ReturnsthegradientoftheexpressionExpr.
Example:grad(2*x^2*yx*z^3,[x,y,z])returns[2*2*x*yz^3,2*x^2,x*3*z^2]

gramschmidt

Syntax:gramschmidt(Basis(B),ScalarProd(Sp))
ReturnsanorthonormalbaseofEofbaseBforthescalarproductSp.
Example:gramschmidt([1,1+x],(p,q)>integrate(p*q,x,1,1))returns[1/(2),(1+x1)/(6)/3]

greduce

Syntax:greduce(Poly,ListPoly,ListVar)
ReturnstheremainderofthedivisionofapolynomialbyaGroebnerbasis.
Example:greduce(x*y1,{x^2y^2,2*x*yy^2,y^3},{x,y})returns(1/2)*y^21

green

Syntax:('display')=[color]
Forexample,supposeyouhavedrawnacircleintheGeometryapp.InSymbolicview,thecircle's
definitionmightbeGC:=circle(GA,GBGA).Ifyouwantedthatcircletobe,say,red,youcouldmodifythat
definitiontoread:
Example:GC:=circle(GA,GBGA,('display')=red)

GROBH

Syntax:GROBH(G)
ReturnstheheightofG.

GROBH_P

Syntax:GROBH_P(G)
ReturnstheheightofG.

GROBW

Syntax:GROBW(G)
ReturnsthewidthofG.

GROBW_P

Syntax:GROBW_P(G)
ReturnsthewidthofG.

half_line

Syntax:half_line(Point1,Point2)
Given2points,drawsarayfromthefirstpointthroughthesecondpoint.
Example:half_line(0,1+i)drawsaraystartingattheoriginandpassingthroughthepointat(1,1)

halftan

Syntax:halftan(Expr)
Transformssin(x),cos(x)andtan(x)asafunctionoftan(x/2).
Example:halftan(sin(x))returns(2*tan(x/2))/((tan(x/2))^2+1)

halftan_hyp2exp

Syntax:halftan_hyp2exp(Expr)
Transformsthetrigonometricfunctionsintan(x/2)andhyperbolicfunctionsintoexpontials.
Example:halftan_hyp2exp(sin(x)+sinh(x))returns(2*tan(x/2)/((tan(x/2))^2+1)+(exp(x)1/exp(x))/2

halt

Syntax:halt(NULL)
Putsaprograminstepbystepdebugmode.

hamdist

Syntax:hamdist(Intg,Intg)BitHammingdistance.Example:hamdist(0x12,0x38)returns3

harmonic_
conjugate

Syntax:harmonic_conjugate(LineorPnt,LineorPnt,LineorPnt)
Returnstheharmonicconjugateof3pointsorof3parallelorconcurrentlinesorthelineofconjugatesof
apointinrespectto2lines.

Page19of53

Command

Description

harmonic_
division

Syntax:harmonic_division(PntorLine,PntorLine,PntorLine,Var)
Returnsthe4points(resplines)andaffectsthelastargument,suchasthe4points(resplines)areina
harmonicdivision.

has

Syntax:has(Expr,Var)
Checksifavariableisinanexpression.
Example:has(x+y,x)returns1

head

Syntax:head(VectorSeqorStr)
Showsthefirstelementofavectororasequenceorastring.
Example:head(1,2,3)returns1

Heaviside

Syntax:Heaviside(Real)
Functionequalto0ifx<0and1ifx>=0
Example:Heaviside(1)returns1

hermite

Syntax:hermite(Integer)
ReturnsnthHermitepolynomial.
Example:hermite(3)returns8*x^312*x

hessenberg

Syntax:hessenberg(Mtrx(A))
MatrixreductiontoHessenbergform.Returns[P,B]suchthatB=inv(P)*A*P.
Example:hessenberg([[1,2,3],[4,5,6],[7,8,1]])returns
[[[1,0,0],[0,4/7,1],[0,1,0]],[[1,29/7,2],[7,39/7,8],[0,278/49,3/7]]]

hessian

Syntax:hessian(Expr,LstVar)
ReturnsthehessianmatrixoftheexpressionExpr.
Example:hessian(2*x^2*yx*z,[x,y,z])returns[[4*y,4*x,1],[2*2*x,0,0],[1,0,0]]

hexagon

Syntax:hexagon(Point1,Point2,[Var1,Var2,Var3,Var4])
Drawsaregularhexagondefinedbyoneofitssides;thatis,bytwoconsecutivevertices.Theremaining
pointsarecalculatedautomatically,butarenotdefinedsymbolically.Theorientationofthehexagonis
counterclockwisefromthefirstpoint.
Examples:
hexagon(0,6)drawsaregularhexagonwhosefirsttwoverticesareat(0,0)and(6,0).
hexagon(0,6,a,b,c,d)drawsaregularhexagonwhosefirsttwoverticesareat(0,0)and(6,0)llabelsthe
otherfourverticesa,b,c,andd,andstoresthecoordinatesintotheCASvariablesa,b,c,andd.Youdo
nothavetodefinevariablesforallfourremainingpoints,butthecoordinatesarestoredinorder.For
example,hexagon(0,6,a)storesjustthethirdpointintotheCASvariablea.

hilbert

Syntax:hilbert(Intg(n))
ReturnstheordernHilbertmatrix:Hjk=1/(j+k+1)j,k=1..n
Example:hilbert(4)returns[[1,1/2,1/3,1/4],[1/2,1/3,1/4,1/5],[1/3,1/4,1/5,1/6],[1/4,1/5,1/6,1/7]]

HMS

Syntax:HMS(value)
Decimaltohoursminutesseconds.
ChangethewayanumberisdisplayedtoHMSformat.
HMS(8.5)returns83

HMS

Syntax:HMS(value)
Hoursminutessecondstodecimal.
ForcesanumbertobedisplayedindecimalformatifitwaspreviouslydisplayedinDMSformat
HMS(830)returns8.5

homothety

Syntax:homothety(Point,Realk,Object)
Dilatesageometricobject,withrespecttoacenterpoint,byascalefactor.
Examples:
homothety(GA,2,GB)createsadilationcenteredatpointAthathasascalefactorof2.EachpointPon
geometricobjectBhasitsimagePonrayAPsuchthatAP=2AP.
homothety(point(0,0),1/3,point(9,9))createsanimagepointat(3,3)

hyp2exp

Syntax:hyp2exp(ExprHyperb)
Transformsthehyperbolicfunctionswiththeexponentialfunction.
Example:hyp2exp(cosh(x))returns(exp(x)+1/exp(x))/2

Page20of53

Command

Description

hyperbola

Syntax:hyperbola(Point1,Point2,Point3)orhyperbola(Point1,Point2,Realk)Drawsahyperbola,given
thefociandeitherapointonthehyperbolaorascalarthatisonehalftheconstantdifferenceofthe
distancesfromapointonthehyperbolatoeachofthefoci.
Examples:
hyperbola(GA,GB,GC)drawsthehyperbolawhosefociarepointsAandBandwhichpassesthrough
pointC.
hyperbola(GA,GB,3)drawsahyperbolawhosefociarepointsAandB.ForanypointPonthehyperbola,
|APBP|=6.

iabcuv

Syntax:iabcuv(Intg(a),Intg(b),Intg(c))
Returns[u,v]suchasau+bv=cfor3integersa,b,c
Example:iabcuv(21,28,7)returns[1,1]

ibasis

Syntax:ibasis(Lst(Vect,..,Vect),Lst(Vect,..,Vect))
Basisoftheintersectionoftwovectorspaces.
Example:ibasis([[1,0,0],[0,1,0]],[[1,1,1],[0,0,1]])returns[[1,1,0]]

ibpdv

Syntax:ibpdv(Expr1,Expr2,[Var],[Real1],[Real2])
IntegrationbypartsofExpr1=u(Var)*v'(Var)withExpr2=v'(Var)(or0)as2ndargument.Youcanspecifya
variableofintegrationandalsotheboundsofintegration(Real1andReal2).
Example:ibpdv(x*ln(x),1)returns(1/4)*x^2+(1/2)*(x^2)*ln(x)

ibpu

Syntax:ibpu(Expr1,Expr2,[Var],[Real1],[Real2])
IntegrationbypartsofExpr1=u(Var)*v'(Var)withExpr2=u(Var)(or0)as2ndargument.Youcanspecifya
variableofintegrationandalsotheboundsofintegration(Real1andReal2).
Example:ibpu(ln(x),ln(x),x,1,3)returns[3*ln(3),1]

ichinrem

Syntax:ichinrem([a,p],[b,q]))
IntegerChineseRemainderTheoremfortwoequations.Takestwolists[a,p]and[b,q]andreturnsalist
oftwointegers,[r,n],suchthatxrmodn.Inthiscase,xissuchthatxamodpandxbmodq;also,
n=p*q.
Example:ichinrem([2,7],[3,5])returns[12,35]

icontent

Syntax:icontent(Poly,[Var])
ReturnstheGCDoftheintegercoefficientsofapolynomial.
Example:icontent(24x^3+6x^212x+18)returns6

id

Syntax:id(Seq)
Thenameoftheidentityfunction(R^n>R^n)
Example:id(1,2,3)returns1,2,3

IDENMAT

Syntax:IDENMAT(n)
Identitymatrix.Createsasquarematrixofdimensionnxnwhosediagonalelementsare1andoff
diagonalelementsarezero.
Example:IDENMAT(2)returns[[1,0],[0,1]]

identity

Syntax:identity(Intg(n))
Returnstheidentitymatrixofspecifieddimensionn.
Example:identity(3)returns[[1,0,0],[0,1,0],[0,0,1]]

idivis

Syntax:idivis(a)
Integerdivisors.Returnsalistofallthefactorsoftheintegera.
Example:idivis(12)returns[1,2,3,4,6,12]

iegcd

Syntax:iegcd(a,b)
Extendedgreatestcommondivisorfortwointegers.Returns[u,v,igcd(a,b)]suchthata*u+b*v=igcd(a,b).
Example:iegcd(14,21)returns[1,1,7]

IF

Startsan"IF...THEN...END"or"IF...THEN...ELSE...END"branchstructure.
Syntax:IFtestTHENcommand(s)[ELSEcommands]END;
Evaluatestest.Iftestistrue(non0),executescommand(s);otherwise,executesthecomandsintheELSE
clausenothinghappens.
IFA<1
THENPRINT("AISSMALLERTHAN1");
ELSEPRINT("AISLARGERTHAN1");
END;

Page21of53

Command

Description

ifactor

Syntax:ifactor(a)
Primefactorization.Returnstheprimefactorizationoftheintegeraasaproduct.CanbeusedwithSTO.
Example:ifactor(150)returns2*3*5^2

ifactors

Syntax:ifactors(a)Primefactors.Similartoifactor,butreturnsalistofthefactorsoftheintegerawith
theirmultiplicities.
Example:ifactors(150)returns[2,1,3,1,5,2]

IFERR

Syntax:IFERRcommands1THENcommands2[ELSEcommands3]END;
Executessequenceofcommands1.Ifanerroroccursduringexecutionofcommands1,executesequence
ofcommands2.Otherwise,executesequenceofcommands3.
ManyconditionsareautomaticallyrecognizedbytheHPPrimeaserrorconditionsandareautomatically
treatedaserrorsinprograms.Thiscommandfacilitateserrortrappingofsucherrors.

ifft

Syntax:ifft(Vect)
InverseFastFourierTransform.
Example:ifft([100.0,52.2842712475+6*i,8.0*i,4.284271247466*i,4.0,4.28427124746+6*i,8*i,
52.28427124756*i])returns[0.99999999999,3.99999999999,10.0,20.0,25.0,24.0,16.0,
6.39843733552e12]

IFTE

Syntax:IFTE(Expr,Trueclause,Falseclause)
If...Then...Else...
IfExprevaluatestrue(1),evaluatesTrueclause;ifnot,evaluatesFalseclause.
Example:IFTE(2<3,51,2+7)returns4

igcd

Syntax:igcd(a,b)
Greatestcommondivisor.Returnstheintegerthatisthegreatestcommondivisoroftheintegersaadb.
Example:igcd(24,36)returns12

ihermite

Syntax:ihermite(Mtrx(A))
HermitenormalformofamatrixwithcoefficientsinZ:returnsU,BsuchthatUisinvertibleinZ,Bupper
triangularandB=U*A
Example:ihermite([[1,2,3],[4,5,6],[7,8,9]])returns[[3,1,0],[4,1,0],[1,2,1]],[[1,1,3],[0,3,6],[0,0,0]]

ilaplace

Syntax:ilaplace(Expr,[Var],[IlapVar])
InverseLaplacetransformofarationalfraction.
Example:ilaplace(1/(x^2+1)^2)returns(x)*cos(x)/2+sin(x)/2

IM

Syntax:IM(x+yi)
ImaginaryPart.Returnstheimaginarypartofacomplexnumber.
Example:IM(3+4i)returns4

incircle

Syntax:incircle(Point1,Point2,Point3)
Drawstheincircleofatriangle,thecircletangenttoallthreesidesofthetriangle.
Example:incircle(GA,GB,GC)drawstheincircleofABC.

INPUT

Syntax:INPUT(var,[title],[label],[help],[reset])
orINPUT({vars},[title],[{labels}],[{help}],[{reset}])
Startsadialogboxwithheadertitleandonefieldnamedlabel(withvaluedefault),displayinghelpatthe
bottom.ThedialogboxincludesCANCELandOKmenukeys.IftheuserpressestheOKmenukey,the
variablevarisupdatedand1isreturned.IftheuserpressestheCANCLmenukey,varisnotupdatedand
0isreturned.

INSTRING

Syntax:INSTRING(string1,string2)
Returnstheindexofthefirstoccurrenceofstring2instring1.Returns0ifstr2isnotpresentinstr1.Note
thatthefirstcharacterinastringisinposition1.
Example:
INSTRING("vanilla","van")returns1
INSTRING("banana","na")returns3
INSTRING("ab","abc")returns0

int

Syntax:int(Expr,[Var],[Real1,Real2])
Integral(definiteorindefinite).Youcanspecifyavariableofintegrationaswellastheboundsofr
integration.YoucanusetheintegrationtemplateintheTemplatemenuaswell.
Examples:
int(1/x)returnsln(abs(x))
int(sin(x),x,0,)returns2

Page22of53

Command

Description

inter

Syntax:inter(Curve1,Curve2)
Returnstheintersectionsoftwocurvesasavector.
Example:inter(8x^2/6,x/21)returns[[6,2][9,11/2]],indicatingthattherearetwointersectionsone
at(6,2)andtheotherat(9,5.5).

INTERSECT

Syntax:INTERSECT({list1},...{listN})Returnsalistoftheelementscommontoallthelists.Example:
INTERSECT({1,2,3},{2,4,8})returns{2}

interval2center

Syntax:interval2center(IntervalorReal)
Returnsthecenteroftheintervalortheobject.
Example:interval2center(2..5)returns7/2

inv

Syntax:inv(Expr||Mtrx)
Returnstheinverseofanexpressionormatrix.
Example:inv(9/5)returns5/9

inversion

Syntax:inversion(Point1,Realk,Point2)
Drawstheinversionofapoint,withrespecttoanotherpoint,byascalefactor.
Example:inversion(GA,3,GB)drawspointConlineABsuchthatAB*AC=3.Inthiscase,pointAisthe
centeroftheinversionandthescalefactoris3.PointBisthepointwhoseinversioniscreated.
Ingeneral,theinversionofpointAthroughcenterC,withscalefactork,mapsAontoA,suchthatAis
onlineCAandCA*CA=k,whereCAandCAdenotethelengthsofthecorrespondingsegments.Ifk=1,
thenthelengthsCAandCAarereciprocals.

INVERT

Syntax:INVERT([G],[x1,y1],[x2,y2])
InvertstherectangleonGdefinedbythediagonalpoints(x1,y1)and(x2,y2).Theeffectisreversevideo.
Thefollowingvaluesareoptionalandtheirdefaultsarelisted:
x1,y1=topleftcornerofG
x2,y2=bottomrightcornerofG
Ifonlyonex,ypairisspecified,itreferstothetopleftcornerofG.

INVERT_P

Syntax:INVERT_P([G],[x1,y1],[x2,y2])
InvertstherectangleonGdefinedbythediagonalpoints(x1,y1)and(x2,y2).Theeffectisreversevideo.
Thefollowingvaluesareoptionalandtheirdefaultsarelisted:
x1,y1=topleftcornerofG
x2,y2=bottomrightcornerofG
Ifonlyone(x,y)pairisspecified,itreferstothetopleftcornerofG.

invlaplace

Syntax:ilaplace(Expr,[Var],[IlapVar])
ReturnstheinverseLaplacetransformofExpr.
Example:ilaplace(1/(x^2+1)^2)returns(x/2)*cos(x)+(1/2)*sin(x)

invztrans

Syntax:invztrans(Expr,[Var],[InvZtransVar])
Inverseztransformofarationalfraction.
Example:invztrans(1/(x^2+1)^2)returns(x*exp(x*(i)*/2)+x*exp(x*(i)*/2)+4*Dirac(x)2*exp(x*(
i)*/2)2*exp(x*(i)*/2))/4

IP

Syntax:IP(value)
Integerpart.ReturnstheIntegerpartofvalue.
Example:IP(23.2)returns23

iPart

Syntax:iPart(Real||LstReal)
Returnstheargumentwithoutitsfractionalpart(type=DOM_FLOAT).
Example:iPart(4.3)returns4.0

iquo

Syntax:iquo(a,b)
Euclideanquotient.Returnstheintegerquotientwhentheintegeraisdividedbytheintegerb.
Example:iquo(63,23)returns2

iquorem

Syntax:iquorem(a,b)
Euclideanquotientandremainder.Returnstheintegerquotientandremainderwhentheintegerais
dividedbytheintegerb.
Example:iquorem(63,23)returns[2,17]

irem

Syntax:irem(a,b)
Euclideanremainder.Returnstheintegerremainderwhentheintegeraisdividedbytheintegerb.
Example:irem(63,23)returns17

Page23of53

Command

Description

is_collinear

Syntax:is_collinear(Point1,Point2,...,Pointn)
Takesasetofpointsasargumentandtestswhetherornottheyarecollinear.Returns1ifthepointsare
collinearand0otherwise.
Example:
is_collinear(point(0,0),point(5,0),point(6,1))returns0.

is_concyclic

Syntax:is_concyclic(Point1,Point2,,Pointn)Takesasetofpointsasargumentandtestsiftheyareall
onthesamecircle.Returns1ifthepointsareallonthesamecircleand0otherwise.
Example:is_concyclic(point(4,2),point(4,2),point(4,2),point(4,2))returns1

is_conjugate

Syntax:is_conjugate(Crcle,Point1,Point2,[Point3])oris_conjugate(Line1,Line2,Line3,{Line4])
Returns1ifthe3(resp4)argumentsareconjugatedtowardacircle(resp2lines)and0otherwise.

is_coplanar

Syntax:is_coplanar(Point1,Point2,Point3,Point4)
Testsif4pointsareinthesameplane.Returns1iftrueor0iffalse.

is_element

Syntax:is_element(Point,Object)
Testsifapointisonageometricobject.Returns1ifitisand0otherwise
Example:is_element(point(((2)/2),((2)/2)),circle(0,1))returns1

is_equilateral

Syntax:is_equilateral(Point1,Point2,Point3)
Takesthreepointsandtestswhetherornottheyareverticesofasingleequilateraltriangle.Returns1if
theyareand0otherwise..
Example:is_equilateral(triangle(0,2,1+i*3))returns1.

is_harmonic

Syntax:is_harmonic(PntorCplx,PntorCplx,PntorCplx,PntorCplx)
Returns1ifthe4pointsareinaharmonicdivisionand0otherwise.

is_harmonic_
circle_bundle

Syntax:is_harmonic_circle_bundle(Lst(Crcle))
Returns1ifthecirclesbuildabundle,2iftheyhavethesamecenter,3iftheyarethesameand0
otherwise.

is_harmonic_
line_bundle

Syntax:is_harmonic_line_bundle(Lst(Line))
Returns1ifthelineshaveacommonpoint,2iftheyareparallels,3iftheyarethesameand0otherwise.

is_isosceles

Syntax:is_isosceles(Point1,Point2,Point3)
Takesthreepointsandtestswhetherornottheyareverticesofasingleisoscelestriangle.Returns0if
theyarenot.Iftheyare,returnsthenumberorderofthecommonpointofthetwosidesofequallength
(1,2,or3).Returns4ifthethreepointsformanequilateraltriangle.
Examples:
is_isosceles(point(0,0),point(4,0),point(2,4))returns3
is_isosceles(triangle(0,i,1+i))returns2

is_orthogonal

Syntax:is_orthogonal(Line1,Line2)oris_orthogonal(Circle1,Circle2
Testswhetherornottwolinesortwocirclesareorthogonal(perpendicular).Inthecaseoftwocircles,
testswhetherornotthetangentlinesatapointofintersectionareorthogonal.Returns1iftheyareand
0otherwise.
Example:is_orthogonal(line(y=x),line(y=x))returns1.

is_parallel

Syntax:is_parallel(Line1,Line2)
Testswhetherornottwolinesareparallel.Returns1iftheyareand0otherwise.
Example:is_parallel(line(2x+3y=7),line(2x+3y=9)returns1.

is_parallelogram

Syntax:is_parallelogram(Point1,Point2,Point3,Point4)
Testswhetherornotasetoffourpointsareverticesofaparallelogram.Returns0iftheyarenot.Ifthey
are,thenreturns1iftheyformonlyaparallelogram,2iftheyformarhombus,3iftheyformarectangle,
and4iftheyformasquare.
Example:is_parallelogram(point(0,0),point(2,4),point(0,8),point(2,4))returns2.

is_perpendicular

Syntax:is_perpendicular(line1,Line2)
Similartois_orthogonal.Testswhetherornottwolinesareperpendicular.Returns1iftheyareor0if
theyarenot.
Example:is_perpendicular(line(y=x),line(y=x))returns1

Page24of53

Command

Description

is_rectangle

Syntax:is_rectangle(Point1,Point2,Point3,Point4)Testswhetherornotasetoffourpointsarevertices
ofarectangle.Returns0iftheyarenot,1iftheyare,and2iftheyareverticesofasquare.
Examples:
is_rectangle(point(0,0),point(4,2),point(2,6),point(2,4))returns2.Withasetofonlythreepointsas
argument,testswhetherornottheyareverticesofarighttriangle.Returns0iftheyarenot.Iftheyare,
returnsthenumberorderofthecommonpointofthetwoperpendicularsides(1,2,or3).
is_rectangle(point(0,0),point(4,2),point(2,6))returns2.

is_rhombus

Syntax:is_rhombus(PntorCplx,PntorCplx,PntorCplx,PntorCplx)
Returns1or2ifthe4points(ortheobject)buildarhombus(2forasquare)and0otherwise.

is_square

Syntax:is_square(Point1,Point2,Point3,Point4)
Testswhetherornotasetoffourpointsareverticesofasquare.Returns1iftheyareand0otherwise.
Example:is_square(point(0,0),point(4,2),point(2,6),point(2,4))returns1

ISKEYDOWN

Syntax:ISKEYDOWN(Key_ID)
Returnstrue(nonzero)ifthekeywhoseKey_IDisprovidediscurrentlypressed,andfalse(0)ifitisnot.

ismith

Syntax:ismith(Mtrx(A))
SmithnormalformofamatrixwithcoefficientsinZ:returnsU,B,VsuchthatUandVareinvertibleinZ,B
isthediagonal,B[i,i]divideB[i+1,i+1]andB=U*A*V.
Example:ismith([[1,2,3],[4,5,6],[7,8,9]])returns[[1,0,0],[4,1,0],[1,2,1]],[[1,0,0],[0,3,0],[0,0,0]],[[1,
2,1],[0,1,2],[0,0,1]]

isobarycenter

Syntax:isobarycenter(Point1,Point2,,Pointn)
Returnsthehypotheticalcenterofmassofasetofpoints.Workslikebarycenterbutassumesallpoints
haveequalweight.
Example:isobarycenter(3,3,3*3*i)returnspoint(3*3*i/3),whichisequivalentto(0,3).

isopolygon

Syntax:isopolygon(Point1,Point2,Realn),whererealnisanintegergreaterthan1.
Drawsaregularpolygongiventhefirsttwoverticesandthenumberofsides,wherethenumberofsides
isgreaterthan1.Ifthenumberofsidesis2,thenthesegmentisdrawn.YoucanprovideCASvariable
namesforstoringthecoordinatesofthecalculatedpointsintheordertheywerecreated.The
orientationofthepolygoniscounterclockwise.
Example:isopolygon(GA,GB,6)drawsaregularhexagonwhosefirsttwoverticesarethepointsAandB.

isosceles_
triangle

Syntax:isosceles_triangle(Point1,Point2,Angle)
Drawsanisoscelestriangledefinedbytwoofitsverticesandanangle.Theverticesdefineoneofthetwo
sidesequalinlengthandtheangledefinestheanglebetweenthetwosidesofequallength.Like
equilateral_triangle,youhavetheoptionofstoringthecoordinatesofthethirdpointintoaCASvariable.
Example:isosceles_triangle(GA,GB,angle(GC,GA,GB)definesanisoscelestrianglesuchthatoneofthe
twosidesofequallengthisAB,andtheanglebetweenthetwosidesofequallengthhasameasureequal
tothatofACB.

isPrime

Syntax:isprime(a)
Primeintegertest.Returnstrueiftheintegeraisprime;otherwise,returnsfalse.
Example:isprime(1999)returnstrue

ITERATE

Syntax:ITERATE(expr,var,ivalue,#times)
Repeatedlyfor#timesevaluatesexprintermsofvar.Thevalueforvarisupdatedeachtime,starting
withivalue.
ITERATE(X^2,X,2,3)returns256.

ithprime

Syntax:ithprime(n)
Nthprime.Fortheintegern,returnsthenthprimenumberlessthan100,000200,000.
ithprime(5)returns11

jacobi_symbol

Syntax:jacobi_symbol(Intg,Intg)
Jacobisymbol.
Example:jacobi_symbol(132,5)returns1

jordan

Syntax:jordan(Mtrx)
ReturnsthelistmadebythematrixofpassageandtheJordanformofamatrix.
Example:jordan([[0,2],[1,0]])returns[[2,2],[1,1]],[[2,0],[0,2]]

JordanBlock

Syntax:JordanBlock(Expr(a),Intg(n))Returnsamatrixn*nwithaonthediagonal,1above,and0
everywhereelse.
Example:JordanBlock(7,3)returns[[7,1,0],[0,7,1],[0,0,7]]

Page25of53

Command

Description

ker

Syntax:ker(Mtrx(M))
KernelofalinearapplicationofmatrixM.
Example:ker([[1,2],[3,6]])returns[2,1]

KILL

Syntax:KILL;
Stopstheexecutionoftheprogram.

l1norm

Syntax:l1norm(Vect)
Returnsthel1normofthevector=sumoftheabsolutevalueofitscoordinates.
Example:l1norm([3,4,2])returns9

l2norm

Syntax:l1norm(Vect)
Returnsthel1normofthevector=sumoftheabsolutevalueofitscoordinates.
Example:l1norm([3,4,2])returns9

lagrange

Syntax:lagrange((Listxk,Listyk)orlagrange(Matrix)
Returnsthepolynomialofdegreen1suchthatP(xk)=yk,fork=0,1,...,n1.
Example:lagrange([1,3],[0,1])returns(1/2)*(x1)

laguerre

Syntax:laguerre(Integer)
ReturnsthenthLaguerrepolynomial.
Example:laguerre(4)returns(1/24)*a^4+(1/6)*a^3*x+5/12*a^3+1/4*a^2*x^2+(
3/2)*a^2*x+35/24*a^2+(1/6)*a*x^3+7/4*a*x^2+(13/3)*a*x+25/12*a+1/24*x^4+(2/3)*x^3+3*x^2
4*x+1

laplace

Syntax:laplace(Expr,[Var],[LapVar])
ReturnstheLaplacetransformofExpr.
Example:laplace(exp(x)*sin(x))returns1/(x^22*x+2)

laplacian

Syntax:laplacian(Expr(Xpr),LstVar)
ReturnstheLaplacianoftheexpressionXprwithrespecttothelistofvariables.
Example:laplacian(exp(z)*cos(x*y),[x,y,z])returnsx^2*cos(x*y)*exp(z)
y^2*cos(x*y)*exp(z)+cos(x*y)*exp(z)

lcm

Syntax:lcm(Intgr1,Intgr2)orlcm(Poly1,Poly2)orlcm(Rational1,Rational2)
Returnsthelowestcommonmultipleof2polynomialsofseveralvariablesorof2integersorof2
rationals.
Example:lcm(6,4)returns12

lcoeff

Syntax:lcoeff(Poly||Lst)
Returnsthecoefficientofthetermofhighestdegreeofapolynomial(l=leading).
Example:lcoeff(2*x^3+x^2+7*x)returns2

left

Sorry,butnoonlinehelpisavailableforthisitem.
Tobrowsethroughtheentirehelpsystem,tapTree.Youcanthenusethecursorkeystonavigate
throughthesystemandopenhelptopics.Ifyoustillcannotfindthetopicyouareinterestedin,please
consulttheUserGuide.TapOKtoexitthispage.

LEFT

Syntax:LEFT(string,n)
Returnsthefirstncharactersofthestring.
Example:LEFT("MOMOGUMBO",3)returns"MOM"

legendre

Syntax:legendre(Integer)
ReturnsthenthLegendrepolynomial.
Example:legendre(4)returns(35/8)*x^4+(15/4)*x^2+3/8

legendre_symbol

Syntax:legendre_symbol(Intg,Intg)
Legendresymbol.
Example:legendre_symbol(132,5)returns1

length

Syntax:size(LstorStrorSeq)
Returnsthesizeofalist,astringorasequence.
Example:size([1,2,3])returns3

lgcd

Syntax:lgcd(SeqorLst)
Returnsthegreatestcommondivisorofalistofpolynomialsorofintegers.
Examples:
lgcd({45,75,20,15})returns5
lgcd({x^22*x+1,x^31,x1})returnsx1

Page26of53

Command

Description

limit

Syntax:limit(Expr,Var,Val)
Limitofanexpressionasavariableapproachesavalue.Returnsthelimit(2sidedor1sided)ofthegiven
expressionasthegivenvariableapproachesavalue.
Example:limit((n*tan(x)tan(n*x))/(sin(n*x)n*sin(x)),x,0)returns2

lin

Syntax:lin(Expr)Linearizationofexponentials.
Example:lin((exp(x)^3+exp(x))^2)returnsexp(6*x)+2*exp(4*x)+exp(2*x)

line

Syntax:line(Point1,Point2)orline(a*x+b*y+c)orline(point1,slope=realm)
Drawsaline.Theargumentscanbetwopoints,alinearexpressionoftheforma*x+b*y+c,orapointand
aslope.
Examples:
line(2+i,3+2i)drawsthelinewhoseequationisy=x1;thatis,thelinethroughthepoints(2,1)and(3,2).
line(2x3y8)drawsthelinewhoseequationis2x3y=8
line(32i,slope=1/2)drawsthelinewhoseequationisx2y=7;thatis,thelinethrough(3,2)withslope
m=1/2

LINE

Syntax:LINE([G],x1,y1,x2,y2,[color])
DrawsalineonGROBGbetweenpoints(x1,y1)and(x2,y2).

LINE_P

Syntax:LINE_P([G],x1,y1,x2,y2,[color])
DrawsalineonGROBGbetweenpoints(x1,y1)and(x2,y2).

linear_interpolate

Syntax:linear_interpolate(Mtrx,xmin,xmax,xstep)
Makesaregularsamplefromapolygonallinedefinedbya2rowmatrix.
Example:linear_interpolate([[1,2,6,9],[3,4,6,7]],1,9,1)returns
[[1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0],[3.0,4.0,4.5,5.0,5.5,6.0,6.33333333333,6.66666666667,7.0]]

linear_regression

Syntax:linear_regression(Lst||Mtrx(A),[Lst])
Returnsthecoefficientsaandbofy=a*x+b
ItisthebestlineapproximationtothepointswherethecoordinatesaretherowsofA(orthe2lists).
Example:linear_regression([[0.0,0.0],[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]])returns4.0,2.0

LineHorz

Syntax:LineHorz(Expr(a))
Drawsthehorizontalliney=a

LineTan

Syntax:LineTan(f(x),[Var],Value)
Drawsthetangenttoy=f(x)atx=Value.
Example:LineTan(x^2x,1)drawsthelinewhoseequationisy=x1,whichistangenttothegraphof
y=x^2xatx=1.

LineVert

Syntax:LineVert(Expr(a))
Drawstheverticallinex=a

linsolve

Syntax:linsolve(ListLinEq,ListVar)
Linearequationssystemsolver.Solvesasetoflinearequationsfortheircommonvariableset.
Example:linsolve([x+y+z=1,xy=2,2*xz=3],[x,y,z])returns[3/2,1/2,0]

LIST

Syntax:LIST(list)
ListProduct.Calculatestheproductofallelementsinlist.
Example:LIST({2,3,4})returns24.

LIST

Syntax:LIST(list)
ListDifference.Createsanewlistcomposedofthefirstdifferencesoflist;thatis,thedifferences
betweenthesequentialelementsinlist.Thenewlisthasonefewerelementsthanlist.
Example:LIST({1,2,3,5,8})returns{1,1,2,3}

LIST

Syntax:LIST(list)
Sumofalist.Returnsthesumofallelementsinlist.
Example:LIST({2,3,4})returns9

list2mat

Syntax:list2mat(Lst(l),Intg(n))
Returnsthematrixwithncolumnsandwheretermsarethelistlcompletedeventuallyby0.
Example:list2mat([1,8,4,9],1)returns[[1],[8],[4],[9]]

Page27of53

Command

Description

LN

Ln:theNaturallogarithm.
Syntax:LN(Value)
ReturnsthenaturallogarithmofValue.Thenaturallogarithmisthelogarithmtothebasee,Euler's
number.
Example:LN(1)returns0

lname

Syntax:lname(Expr)
Listofvariablesintheexpression.
Example:lname(exp(x)*2*sin(y))returns[x,y]

lncollect

Syntax:lncollect(Expr)Collectlogarithms.Appliesln(a)+n*ln(b)=ln(a*b^n)wherenisaninteger.Example:
lncollect(ln(x)+2*ln(y))returnsln(x*y^2)

lnexpand

Syntax:lnexpand(Expr)
Expandslogarithms.
Example:lnexpand(ln(3*x))returnsln(3)+ln(x)

LNP1

Syntax:LNP1(value)
Naturallogplus1.Thisismoreaccuratethanthenaturallogarithmfunctionwhenxisclosetozero.
Example:LNP1(.23)returns.207014169384

LOCAL

Syntax:LOCALvar_1[:=value][,morevariables];
Declaresalocalvariable.
Ifthedeclarationisinafunctionblock,thesevariableswillbelocaltothefunction.
ifthedeclarationisinthemainprogrambody,thevariablesarelocaltotheprogram.

locus

Syntax:locus(Point,Element)
Givenafirstpointandasecondpointthatisanelementof(apointon)ageometricobject,drawsthe
locusofthefirstpointasthesecondpointtraversesitsobject.

LOG

Generallogarithmfunction
Syntax:LOG(Value,[Base])
ReturnsthelogarithmofValueinBase.Bydefault,Base=10.
Example:LOG(8,2)returns3whileLOG(8)returns0.903089986992

log10

Syntax:log10(Expr)
Commonlogarithm(base10).
Example:log10(10)returns1

logarithmic_
regression

Syntax:logarithmic_regression(Lst||Mtrx(A),[Lst])
Returnsthecoefficientsaandbofy=a*ln(x)+b:itisthebestlogarithmthatapproximatesthepoints
wherethecoordinatesaretherowsofA(orthe2lists).
Example:logarithmic_regression([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]])returns10.1506450002,
0.564824055818

logb

Syntax:logb(Real)
Logarithmofbaseb.
Example:logb(5,2)returnsln(5)/ln(2)whichisapproximately2.32192809489

logistic_regression Syntax:logistic_regression(Lst(L),Real(x0),Real(y0))

Returnsy,y',C,y'max,xmax,R:yisalogisticfunction(solofy'/y=a*y+b),suchthaty(x0)=y0andwhere
[y'(x0),y'(x0+1)...]isthebestapproximationofL.
Example:logistic_regression([0.0,1.0,2.0,3.0,4.0],0.0,1.0)returns[17.77/(1+exp(
0.496893925384*x+2.82232341488+3.14159265359*i)),2.48542227469/(1+cosh(
0.496893925384*x+2.82232341488+3.14159265359*i))]

LQ

Syntax:LQ(matrix)
LQFactorization.Factorsanmnmatrixintothreematrices:{[[mnlowertrapezoidal]],[[nn
orthogonal]],[[mmpermutation]]}.
Example:LQ([[1,2],[3,4]])

LSQ

Syntax:LSQ(matrix1,matrix2)
LeastSquares.Displaystheminimumnormleastsquaresmatrix(orvector).
Example:LSQ([[1,2],[3,4]],[[5],[11]])returns[[1],[2]]

Page28of53

Command

Description

LU

Syntax:LU(matrix)
LUDecomposition.Factorsasquarematrixintothreematrices:
{[[lowertriangular]],[[uppertriangular]],[[permutation]]}
Theuppertriangularhasonesonitsdiagonal.
Example:LU([[1,2],[3,4]])

lvar

Syntax:lvar(Expr)
Listofvariablesofanobject(withrationaldependence).
Example:lvar(exp(x)*2*sin(y))returns[exp(x),sin(y)]

magenta

Syntax:('display')=[color]
Forexample,supposeyouhavedrawnacircleintheGeometryapp.InSymbolicview,thecircle's
definitionmightbeGC:=circle(GA,GBGA).Ifyouwantedthatcircletobe,say,red,youcouldmodifythat
definitiontoread:
Example:GC:=circle(GA,GBGA,('display')=red)

MAKELIST

Syntax:MAKELIST(expression,variable,begin,end,[increment])
MakeList.Calculatesasequenceofelementsforanewlist.Evaluatesexpression,incrementingvariable
frombegintoendvalues,usingincrementsteps(default1).TheMAKELISTfunctiongeneratesaseriesby
automaticallyproducingalistfromtherepeatedevaluationofanexpression.
Example:MAKELIST(2*X1,X,1,5,1)returns{1,3,5,7,9}

MAKEMAT

Syntax:MAKEMAT(expression,n,[m])MakeMatrix.Createsamatrixofdimensionnm,using
expressiontocalculateeachelement.IfexpressioncontainsthevariablesIandJ,thenthecalculationfor
eachelementsubstitutesthecurrentrownumberforIandthecurrentcolumnnumberforJ.Withtwo
arguments,thiscreatesavectorofsizen.
Examples:
MAKEMAT(0,3,3)returns[[0,0,0],[0,0,0],[0,0,0]]
MAKEMAT(2,2,3)returns[[2,2,2],[2,2,2]]
MAKEMAT(I+J1,2,3)returns[[1,2,3],[2,3,4]]
MAKEMAT(2,2)returns[2,2]

MANT

Syntax:MANT(value)
Mantissa.Returnsthesignificantdigitsofvalue.
Example:MANT(21.2E34)returns2.12

map

Syntax:map(Lst(l),Fnc(f))
Applythefunctionfattheelementsofthelistloratapolynomialofinternalformat.
Example:map([1,2,3],x>x^3)returns[1,8,27]

mat2list

Syntax:mat2list(Mtrx)
Returnsthelistofthetermsofthematrix.
Example:mat2list([[1,8],[4,9]])returns[1,8,4,9]

matpow

Syntax:matpow(Mtrx,Intg(n))
Calculatesthenpowerofamatrixbyjordanization.
Example:matpow([[1,2],[3,4]],n)returns[[(333)*((33+5)/2)^n*6/(12*33)+((33)3)*((
(33)+5)/2)^n*6/(12*33),(333)*((33+5)/2)^n*((33)3)/(12*33)+((33)3)*(((33)+5)/2)^n*(
(33)+3)/(12*33)],[6*((33+5)/2)^n*6/(12*33)+6*(((33)+5)/2)^n*6/(12*33),6*((33+5)/2)^n*(
(33)3)/(12*33)+6*(((33)+5)/2)^n*((33)+3)/(12*33)]]

MAX

Syntax:MAX(value1,[value2],[..value16])
Maximum.Returnsthegreatestofthevaluesgiven,orthegreatestvalueofalist.
Example:MAX(210,25)returns210andMAX({1,8,2})returns8

maxnorm

Syntax:maxnorm(VectorMtrx)
Normwiththemaximumofavector(orofamatrix):maxnorm([x1,x2,..,xn])=max(|x1|,..,|xn|)
Example:maxnorm([1,2])returns2

MAXREAL

Syntax:MAXREAL
Maximumrealnumber.ThelargestrealnumbertheHPPrimeiscapableofrepresenting.Thevalueof
MAXREALis9.99999999999E499.Anynumberlargerthanthisisrepresentedasthisnumber.

mean

Syntax:mean(Lst||Mtrx,[Lst])
Meanofalistwiththesecondargumentasweight,orofthecolumnsofamatrix.
Example:mean([1,2,3],[1,2,3])returns7/3

Page29of53

Command

Description

median

Syntax:median(Lst||Mtrx,[Lst])
Returnsthemedianofalistwiththesecondargumentastheweight,orofthecolumnsofamatrix.
Example:median([1,2,3,5,10,4])returns3.0

median_line

Syntax:median_line(Point1,Point2,Point3)
Giventhreepointsthatdefineatriangle,createsthemedianofthetrianglethatpassesthroughthefirst
pointandcontainsthemidpointofthesegmentdefinedbytheothertwopoints.
Example:median_line(0,8i,4)drawsthelinewhoseequationisy=2x;thatis,thelinethrough(0,0)and
(2,4),themidpointofthesegmentwhoseendpointsare(0,8)and(4,0).

member

Syntax:member(Elem(e),(Lst(l)orSet(l)))
Testsifeisinthelistorthesetl(=0ork+1withl[k]=e)
Example:member(1,[4,3,1,2])returns3

MID

Syntax:MID(string,position,[n])
Extractsncharactersfromstringstartingatposition.Ifnisnotspecified,thenMIDextractsthe
remainderofthestringfromposition.
Examples:
MID("MOMOGUMBO",3,5)returns"MOGUM"
MID("PUDGE",4)returns"GE"

midpoint

Syntax:midpoint(Segment)ormidpoint(Point1,Point2)Returnsthemidpointofasegment.Theargument
canbeeitherthenameofasegmentortwopointsthatdefineasegment.Inthelattercase,thesegment
neednotactuallybedrawn.
Example:midpoint(0,6+6i)returnspoint(3,3)

MIN

Syntax:MIN(value1,[value2],[..value16])
Minimum.Returnsthelesserofthevaluesgiven,orthelesservalueofalist.
Example:MIN(210,25)returns25andMIN({1,8,2})returns1

MINREAL

Syntax:MINREAL
Minimumrealnumber.ThesmallestrealnumberthattheHPPrimecanrepresent.Itsvalueis1E499.
Anynumbersmallerthanthisisrepresentedaszero.

mkisom

Syntax:mkisom(Vect,(Sign(1)or1))
Matrixofanisometrygivenbyitsproperelements.
Example:mkisom(,1)returns[[1,0],[0,1]]inradianmode

MKSA

Syntax:MKSA(Value_Unit)
ConvertsthemeasurementValue_UnittoitscorrespondingvalueandunitinUnit'sMKSAequivalent.
MKSAstandsfortheMeterKilogramSecondAmperesystem.
Example:MKSA(32_yd)returns29.2608_m.

MOD

Syntax:value1MODvalue2
Modulo.Returnstheremainderofvalue1/value2.
Example:9MOD4returns1

modgcd

Syntax:modgcd(Poly,Poly)
ReturnstheGCDof2polynomials,withthemodularalgorithm.
Example:modgcd(x^41,(x1)^2)returnsx1

MOUSE

Syntax:MOUSE[(index)]
Returnsthecurrentpointer'slocation.
returns:twolistsoftheform{#x,#y,#originalx,#originaly,#type},oneforeachpotentialpointer.
Note,ifapointerisunused,returnsanemptylist
#typeis:#0:New,#1:Completed,#2:Drag,#3:Stretch,#4:Rotate,#5:LongClick
MOUSE(x)returnsthenthelementthatwouldbereturnedifMOUSEwascalledwithnoarguementsor
1iftheassociatedpointerisnotdown.

mRow

Syntax:mRow(Expr(Xpr),Mtrx(A),Intg(n1))
Multipliestherown1ofthematrixAbyXpr.
Example:mRow(12,[[1,2],[3,4],[5,6]],1)returns[[12,24],[3,4],[5,6]]

MSGBOX

Syntax:MSGBOX(expr,[OK_Cancel])orMSGBOX(string,[OK_Cancel])
Displaysamessageboxwitheitherthevalueofexpressionorstring.IfOK_Cancel?istrue,displaysOK
andCANCELmenukeys,otherwiseonlydisplaystheOKmenukey.DefaultvalueforOK_Cancelisfalse.
Returnstrue(nonzero)iftheuserpressesOK,false(0)iftheuserpressesCANCEL.

Page30of53

Command

Description

mult_c_conjugate

Syntax:mult_c_conjugate(Expr)
Returnstheexpressionaftermultiplicationbythecomplexconjugatedquantityofthedenominator(or
ofthenumeratorifnodenominator).
Example:mult_c_conjugate(1/(3+i*2))returns1*(3+(i)*2)/((3+(i)*2)*(3+(i)*2))

mult_conjugate

Syntax:mult_conjugate(Expr)
Returnstheexpressionaftermultiplicationbytheconjugatedquantityofthedenominator(orofthe
numeratorifnodenominator).
Example:mult_conjugate(32)returns(3(2))*(3+2)/(3+2)

nDeriv

Syntax:nDeriv(Expr(Xpr),Var(var),[Real(h)])
Returnsanapproximationofthederivativenumberatapoint:(Xpr(var+h)Xpr(varh))/(2*h)(bydefault
h=0.001).
Example:nDeriv(f(x),x,h)returns(f(x+h)(f(xh)))*0.5/h

NEG

Syntax:ValueorExpression
Unaryminus.
ChangesthesignofValueorExpression.Usedtoenternegativenumbers.

nextprime

Syntax:nextprime(a)
Nextprime.Returnsthenextprimenumbergreaterthantheintegera.
nextprime(12)returns13

normal

Syntax:normal(Expr)
Simplifytheexpression.
Example:normal(2*x*2)returns4*x

NORMALD

Syntax:NORMALD([,,]x)Normalprobabilitydensityfunction.Computestheprobabilitydensityatthe
valuex,giventhemean,,andstandarddeviation,,ofanormaldistribution.Withoneargument,x,
returnstheprobabilitydensityatx,assumingameanofzeroandstandarddeviationof1.
Example:NORMALD(0.5)returns0.352065326765andNORMALD(0,2,0.5)returns0.193334058402

NORMALD_CDF

Syntax:NORMAL_CDF(,,x)
Cumulativenormaldistributionfunction.Returnsthelowertailprobabilityofthenormalprobability
densityfunctionforthevaluex,giventhemean,,andstandarddeviation,,ofanormaldistribution.
Withoneargument,x,returnsthelowertailprobabilityofthenormalprobabilitydensityfunctionfor
thevaluex,assumingameanofzeroandstandarddeviationof1.
Example:NORMAL_CDF(0,1,2)returns0.97724986805

NORMALD_ICDF

Syntax:NORMALD_ICDF(,,p)
Inversecumulativenormaldistributionfunction.Returnsthecumulativenormaldistributionvalue
associatedwiththelowertailprobability,p,giventhemean,,andstandarddeviation,,ofanormal
distribution.Withoneargument,p,assumesameanofzeroandastandarddeviationofone.
Example:NORMALD_ICDF(0,1,0.841344746069)returns1

normalize

Syntax:normalize(Lst||Cplx)
Returnsthevectordividedbyitsl2norm.Itisalsoanoptionforplotfield.
Example:normalize(3+4*i)returns(3+4*i)/5

NOT

Syntax:NOTValue
LogicalNOT.
Returns1ifValueiszero;otherwisereturns0.
ExampleNOT3returns0

nSolve

Syntax:nSolve(Expr,Var||orVar=Guess)
Returnsanumericalsolutionofanequationorasystemofequations.
Examples:
nSolve(cos(x)=x,x)returns0.739085133215
nSolve(cos(x)=x,x=1.3)returns0.739085133215

NTHROOT

Syntax:Value1Value2
NTHROOT:thenthrootfunction.
ThisShiftkeycombinationistheNTHROOTfunction.ItreturnstheprimaryValue1rootofValue2.Onthe
keyboard,theNTHROOTfunctionisrepresentedbyn.
Example:38returns2

Page31of53

Command

Description

numer

Syntax:numer(a,b)
SimplifiedNumerator.Fortheintegersaandb,returnsthenumeratorofthefractiona/bafter
simplification.
Example:numer(10/12)returns5

odd

Syntax:odd(Intg(n))
Returns1iftheintegerisodd,otherwisereturns0.
Example:odd(6)returns0

odesolve

Syntax:odesolve(Expr,VectVar,VectInitCond,FinalVal,[tstep=Val,curve])
OrdinaryDifferentialEquationsolver.SolvesanordinarydifferentialequationgivenbyExpr,with
variablesdeclaredinVectrVarandinitialconditionsforthosevariablesdeclaredinVectrInit.Forexample,
odesolve(f(t,y),[t,y],[t0,y0],t1)returnstheapproximatesolutionofy'=f(t,y)forthevariablestandywith
initialconditionst=t0andy=y0.
Example:odesolve(sin(t*y),[t,y],[0,1],2)returns[1.82241255674]

open_polygon

Syntax:open_polygon(LstPnt||LstCplx)
Returnsanddrawsthepolygonallinewhereitsverticesaretheelementofl.

OR

Syntax:Value1ORValue2
LogicalOR.
Returns1ifeitherValue1orValue2isnonzero,otherwisereturns0.
Example:3OR2returns1

order_size

Syntax:order_size(Expr)
Remainder(Oterm)ofaseriesexpansion:limit(x^a*order_size(x),x=0)=0ifa>0

ordinate

Syntax:ordinate(Poinnt)orordinate(Vecctor)
Returnstheordinateofapointoravector.
Example:ordinate(point(1+2*i))returns2

orthocenter

Syntax:orthocenter(Triangle)ororthocenter(Point1,Point2,Point3)Returnstheorthocenterofa
triangle;thatis,theintersectionofthethreealtitudesofatriangle.Theargumentcanbeeitherthe
nameofatriangleorthreenoncollinearpointsthatdefineatriangle.Inthelattercase,thetriangledoes
notneedtobedrawn.
Example:orthocenter(0,4i,4)returns(0,0)

pa2b2

Syntax:pa2b2(Intg(n))
Returns[a,b]suchasa^2+b^2=n(fornprimeandn=1(mod4))
Example:pa2b2(17)returns[4,1]

pade

Syntax:pade(Expr(Xpr),Var(x),(Intg(n)||Poly(N)),Intg(p))
PadeapproximationP/Q=Xprmodx^(n+1)ormodNwithdegree(P)<p
Example:pade(exp(x),x,10,6)returns(x^530*x^4420*x^33360*x^215120*x30240)/(x^5
30*x^4+420*x^33360*x^2+15120*x30240)

parabola

Syntax:parabola(Point,Line)orparabola(Point,Realk)orparabola(Expr)
Drawsaparabola,givenafocuspointandadirectrixline,orthevertexoftheparabolaandarealnumber
thatrepresentsthefocallength
Examples:
parabola(GA,GB)drawsaparabolawhosefocusispointAandwhosedirectrixislineB.
parabola(GA,1)drawsaparabolawhosevertexispointAandwhosefocallengthis1.
parabola(xy^2+y2)drawsthegraphoftheparabolicequationx=y^2y+2

parallel

Syntax:parallel(Point,Line)
Drawsalinethroughagivenpointthatisparalleltoagivenline.
Examples:
parallel(A,B)drawsthelinethroughpointAthatisparalleltolineB.
parallel(point(32*i),line(x+y5))drawsthelinethroughthepoint(3,2)thatisparalleltotheline
whoseequationisx+y=5;thatis,thelinewhoseequationisy=x+1.

Page32of53

Command

Description

parallelogram

Syntax:parallelogram(Point1,Point2,Point3)
Drawsaparallelogramgiventhreeofitsvertices.Thefourthpointiscalculatedautomaticallybutisnot
definedsymbolically.Aswithmostoftheotherpolygoncommands,youcanstorethefourthpoints
coordinatesintoaCASvariable.Theorientationoftheparallelogramiscounterclockwisefromthefirst
point.
Example:parallelogram(0,6,9+5i)drawsaparallelogramwhoseverticesareat(0,0),(6,0),(9,5),and
(3,5).Thecoordinatesofthelastpointarecalculatedautomatically.

parameq

Syntax:parameq(Obj)
ReturnsaparametricequationforthegeometricobjectObj.Theparametricequationistrueforall
complexnumbersthatrepresentpointsonObj.
Example:parameq(circle(0,1))returnsexp(i*t)

partfrac

Syntax:partfrac(RatFracorOpt)
Performspartialfractiondecompositiononafraction.
Example:partfrac(x/(4x^2))returns(1/2)/(x2)(1/2)/((x+2)

pcoeff

Syntax:pcoeff(Vect)
ReturnsthepolynomialcoefficientshavingtherootsspecifiedinthevectorVect.
Example:pcoeff([1,0,0,0,1])returnspoly1[1,2,1,0,0,0]

perimeter

Syntax:perimeter(Polygon)orperimeter(Circle)
Returnstheperimeterofapolygonorthecircumferenceofacircle.
Examples:
perimeter(0,1,i)returns2+2
IfGAisthepointat(0,0),GBisthepointat(1,0),andGCisdefinedascircle(GA,GBGA),then
perimeter(GC)returns2.
IfGAisthepointat(0,0),GBisthepointat(1,0),andGCisdefinedassquare(GA,GBGA),then
perimeter(GC)returns4.

perimeterat

Syntax:perimeterat(Polygon,Pnt||Cplx(z0))
Displaysatpoint(z0),withalegend,theperimeterofacircleorofapolygon(e.g.triangle,square,...).

perimeteratraw

Syntax:perimeteratraw(Polygone,Pnt||Cplx(z0))
Displaysatpoint(z0),theperimeterofacircleorofapolygon(e.g.triangle,square,...).

PERM

Syntax:PERM(n,r)
Permutations.Returnsthenumberofpermutations(withregardtoorder)ofnthingstakenratatime:
n!/(nr)!
Example:PERM(5,2)returns20

perpen_bisector

Syntax:perpen_bisector(Segment)orperpen_bisector(Point1,Point2)Drawstheperpendicularbisector
ofasegment.Thesegmentisdefinedeitherbyitsnameorbyitstwoendpoints.
Examples:
perpen_bisector(GC)drawstheperpendicularbisectorofsegmentC.
perpen_bisector(GA,GB)drawstheperpendicularbisectorofsegmentAB.
perpen_bisector(3+2i,i)drawstheperpendicularbisectorofasegmentwhoseendpointshave
coordinates(3,2)and(0,1);thatis,thelinewhoseequationisy=x/3+1.

perpendicular

Syntax:perpendicular(Point,Line)orperpendicular(Point1,Point2,Point3)
Drawsalinethroughagivenpointthatisperpendiculartoagivenline.Thelinemaybedefinedbyits
name,twopoints,oranexpressioninxandy.
Examples:
perpendicular(GA,GD)drawsalineperpendiculartolineDthroughpointA.
perpendicular(3+2i,GB,GC)drawsalinethroughthepointwhosecoordinatesare(3,2)thatis
perpendiculartolineBC.
perpendicular(3+2i,line(xy=1))drawsalinethroughthepointwhosecoordinatesare(3,2)thatis
perpendiculartothelinewhoseequationisxy=1;thatis,thelinewhoseequationisy=x+5.

PI

Syntax:
Theratioofthecircumferencetothediameterofanycircle.Internallyrepresentedas3.14159265359.

Page33of53

Command

Description

PIECEWISE

Syntax(nonCAS,TextbookEntrydisabled):PIECEWISE(test1,case1,...[,testn],casen)
Syntax(CAS,TextbookEntrydisabled):piecewise(test1,case1,...[,testn],casen)
Syntax(TextbookEntryenabled):
{case1iftext1
...
{casen[iftextn]
Evaluatescasesoneafteranotheruntilonecaseistrue.Returnsthecorrespondingcase.
Example(TextbookEntry):
{Evenif(324MOD2)==0
{Oddif

returnsEven

pivot

Syntax:pivot(Mtrx(A),Intg(nl),Intg(nc))
ReturnsthematrixfromAcreatingzerosinthecolumnnc,bythemethodofGaussJordanwiththe
elementA[nl,nc]aspivot.
Example:pivot([[1,2],[3,4],[5,6]],0,1)returns[[1,2],[0,2],[0,4]]

PIXOFF

Syntax:PIXOFF([G],x,y)
SetsthecolorofthepixelofGwithcoordinates(x,y)towhite.

PIXOFF_P

Syntax:PIXOFF_P([G],x,y)
SetsthecolorofthepixelofGwithcoordinates(x,y)towhite.

PIXON

Syntax:PIXON([G],x,y,[color])
SetsthecolorofthepixelofGROBGwithcoordinates(x,y).

PIXON_P

Syntax:PIXON_P([G],x,y,[color])
SetsthecolorofthepixelofGROBGwithcoordinates(x,y).

plotcontour

Syntax:plotcontour(Expr(Xpr),[LstVar],[LstVal])
Draws11contourlinesz=z_min,,...z=z_maxofthesurfacez=Xpr,wherethecontourlinesaredefinedby
the3rdargument.

plotfield

Syntax:plotfield(Expr,VectVar,[Opt])
plotfield(f(t,y),[t,y])drawstheslopefieldofthedifferentialequationy'=f(t,y)

plotfunc

Syntax:plotfunc(Expr)
Drawstheplotofafunction,givenanexpressionintheindependentvariablex.Notetheuseof
lowercasex.
Example:plotfunc(3*sin(x))drawsthegraphofy=3*sin(x).

plotimplicit

Syntax:plotimplicit(Expr,Var1,Var2)
plotimplicit(f(x,y),x,y)orplotimplicit(f(x,y),[x,y])graphoff(x,y)=0

plotinequation

Syntax:plotinequation(Expr,[x=xrange,y=yrange],[xstep],[ystep])
Showsthegraphofthesolutionofinequationswith2variables.

plotlist

Syntax:plotlist(Lst(l)||Mtrx(M))
Drawsapolygonallinethroughthepointsofabscissa0,...,nandordinatel=[y0,...,yn]orthelinethrough
thepointsofabscissainthefirstMcolumnandtheordinatesinthesecondcolumn.

plotode

Syntax:plotode(Expr,VectVar,VectInitCond)
plotode(f(t,y),[t,y],[t0,y0])drawsthesolutionofy'=f(t,y)andy(t0)=y0orofthesystem
[x'=g(t,x,y),y'=h(t,x,y)]withx(t0)=x0andy(t0)=y0.

plotparam

Syntax:plotparam(Cplx||Lst,Var||Lst(Var))
plotparam(a(x)+i*b(x),x=x0..x1)drawsthecurveX=a(x),Y=b(x)x=x0..x1or
plotparam([a(u,v),b(u,v),c(u,v)],[u=u0..u1,v=v0..v1])drawsthesurfaceX=a(u,v),Y=b(u,v),Z=c(u,v)
u=u0..u1andv=v0..v1.

plotpolar

Syntax:plotpolar(Expr,Var,VarMin,VarMax)
plotpolar(f(x),x,a,b)drawsthepolarcurver=fx)forxin[a,b]

plotseq

Syntax:plotseq(Expr(f(Var)),Var=[a,xm,xM],Intg(p))
Forseeingthepthtermsofthesequenceu(0)=a,u(n)=f(u(n1))

Page34of53

Command

Description

pmin

Syntax:pmin(Mtrx,[Var])
Returnstheminimalpolynomialofasquarematrix.
Example:pmin([[1,0],[0,1]],x)returnsx1

point

Syntax:point(Real1,Real2)orpoint(Expr1,Expr2)orpoint(Complex)
Createsapoint,giventhecoordinatesofthepoint.Eachcoordinatemaybeavalueoranexpression
involvingvariablesormeasurementsonotherobjectsinthegeometricconstruction.
Examples:
point(3,4)createsapointwhosecoordinatesare(3,4).Thispointmaybeselectedandmovedlater.
point(abscissa(GA),ordinate(GB))createsapointwhosexcoordinateisthesameasthatofapointAand
whoseycoordinateisthesameasthatofapointB.Thispointwillchangetoreflectthemovementsof
pointAorpointB.

point2d

Syntax:point2d(Var1,Var2,...,Varn)
Randomlyredistributesasetofpointssuchthat,foreachpoint,xisintheinterval[5,5]andyisinthe
interval[5,5].Anyfurthermovementofoneofthepointswillrandomlyredistributeallofthepoints.

POISSON

Syntax:POISSON(,k)
Poissonprobabilitymassfunction.Computestheprobabilityofkoccurrencesofaneventinatime
interval,givenexpected(ormean)occurrencesoftheeventinthatinterval.Forthisfunction,kisa
nonnegativeintegerandisarealnumber.
Example:POISSON(4,2)returns0.14652511111

POISSON_CDF

Syntax:POISSON_CDF(,x)
Cumulativepoissondistributionfunction.Returnstheprobabilityofxorfeweroccurrencesofaneventin
agiventimeinterval,givenexpected(ormean)occurrences.
POISSON_CDF(4,2)returns0.238103305554

POISSON_ICDF

Syntax:POISSON_ICDF(,p)
Inversecumulativepoissondistributionfunction.Returnsthevaluexsuchthattheprobabilityofxor
feweroccurrencesofaneventinatimeinterval,withexpected(ormean)occurrencesoftheeventin
theinterval,isp.
Example:POISSON_ICDF(4,0.238103305554)returns2

polar

Syntax:polar(Crcle,PntorCplxe(A))
ReturnsthelineoftheconjugatedpointsofAwithrespecttothecircle.

polar_
coordinates

Syntax:polar_coordinates(PntorCplxorLstRectCoord)
Returnsthelistofthenormandoftheargumentoftheaffixofapoint(for2D)orofacomplexnumber
orofthethelistofrectangularcoordinates.
Example:polar_coordinates(point(1+2*i))returns[5,atan(2)]

polar_point

Syntax:polar_point(Real(r),Real(t))
Returnsthepoint(for2D)withtheargumentsrandtaspolarcoordinates.

pole

Syntax:pole(Crcle,Line)
Returnsthepointhavingthelineaspolarwithrespecttothecircle.

poly2symb

Syntax:poly2symb(Lst,Var)
Returnsapolynomial(orthepolynomialanditsvalue)inVar(bydefaultx),thepolynomialbeingdefined
bythevectorofcoefficentsinVect.
Examples:
poly2symb([1,2,3],x)returns(x+2)*x+3
poly2symb([1,2,3],x=2)returns(x+2)*x+3=11

POLYCOEF

Syntax:POLYCOEF(vectororlist)
Polynomialcoefficients.Returnsthecoefficientsofthepolynomialwiththerootsspecifiedinvector.
POLYCOEF({1,1})returns{1,0,1}

POLYEVAL

Syntax:POLYEVAL(vectororlist,value)
Polynomialevaluation.Evaluatesapolynomialwiththecoefficientsspecifiedinvector,atvalue.
POLYEVAL({1,0,1},3)returns8

polygon

Syntax:polygon(Point1,Point2,,Pointn)
Drawsapolygonfromasetofvertices.
Example:polygon(GA,GB,GD)drawsABD

Page35of53

Command
polygonplot

Description
Syntax:polygonplot(Mtrx)
Drawsthepolygonsjoiningforjfixedandfork=0..nrows,thepoints(xk,yk)wherexk=elementrowk
column0andyk=elementrowkcolumnj,whenthexkaresorted(weobtainncols1polygons).

polygonscatterplot Syntax:polygonscatterplot(Mtrx)

Drawsthepoints(xk,yk)andthepolygonsjoiningforjfixedandfork=0..nrows,thepoints(xk,yk)where
xk=elementrowkcolumn0andyk=elementrowkcolumnj,whenthexkaresorted(weobtainncols1
polygons).

polynomial_
regression

Syntax:polynomial_regression(Lst||Mtrx(A),[Lst],Intg(n))
Returnsthecoefficients(an,...a1,a0)ofy=an*x^n+..a1x+a0):itisthebestpolynomialthatapproximates
thepointswherethecoordinatesaretherowsofA(orthe2lists)(nisthe2ndargument).
Example:polynomial_regression([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]],3)returns[0.0,1.0,0.0,0.0]

POLYROOT

Syntax:POLYROOT(vector)
Polynomialroots.Returnstherootsforthepolynomialwhosecoefficientsarespecifiedinvector.
Example:POLYROOT([1,0,1])returns{1,1}

POS

Syntax:POS(list,element)
ListPosition.Returnsthepositionofelementwithinlist.Ifthereismorethanoneinstanceofthe
element,thepositionofthefirstoccurrenceisreturned.Avalueof0isreturnedifthereisnooccurrence
ofthespecifiedelement.
Example:POS({0,1,3,5},1)returns2

potential

Syntax:potential(Vect(V),VectVar)
ReturnsUsuchasderive(U,Vector_of_variable)=V
Example:potential([2*x*y+3,x^24*z,4*y],[x,y,z])returns2*x^2*y/2+3*x4*y*z

pow2exp

Syntax:pow2exp(Expr)
Convertspowerstoexponentials.Essentiallytheinverseofexp2pow.
Example:pow2exp(a^b)returnsexp(b*ln(a))

power_
regression

Syntax:power_regression(Lst|Mtrx(A),[Lst])
Returnsthecoefficients(m,b)ofy=b*x^m:itisthebestmonomialthatapproximatesthepointswhere
thecoordinatesaretherowsofA(orthe2lists).
Example:power_regression([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]])returns2.0,1.0

powerpc

Syntax:powerpc(Cercle,PntorCplx)
Returnstherealnumberd^2R^2(d=distancebetweenpointandcenter,R=radius).
Example:powerpc(circle(0,1+i),3+i)returns8

powexpand

Syntax:powexpand(Expr)
Expressesapowerintheformofaproduct.
Example:powexpand(2^(x+y))yields(2^x)*(2^y)

powmod

Syntax:powmod(a,n,p)
Powerandmodulo.Fortheintegersa,n,andp,returnsa^nmodp.
Example:powmod(5,2,13)returns12

prepend

Syntax:prepend(Lst,Elem)
Putstheelementatthebeginningofthelist.
Example:prepend([1,2],3)returns[3,1,2]

preval

Syntax:preval(f(Var),Real1,Real2,[Var])
Returnsf(Real2)f(Real1).
Example:preval(x^22,2,3)returns5

prevprime

Syntax:prevprime(a)
Previousprime.Returnsthepreviousprimenumberbeforetheintegera.
Example:prevprime(11)returns7

primpart

Syntax:primpart(Poly,[Var])
ReturnsthepolynomialPdividedbythegcdofitscoefficients.
Example:primpart(2x^2+10x+6)returnsx^2+5*x+3

Page36of53

Command

Description

PRINT

Syntax:PRINT(expr)orPRINT(string)orPRINT()
Printseithertheresultofexprorstringtotheterminal.
TheterminalisaprogramtextoutputviewingmechanismwhichisdisplayedonlywhenPRINT
commandsareexecuted.Whenvisible,youcanusetheup/downkeystoviewthetext,BKSPtoerasethe
textandanyotherkeytohidetheterminal.YoucanshowtheterminalatanytimeusingtheON+T
combination(pressandHOLDtheONkey,thenpresstheTkey,thenreleasebothkeys).PressingON
stopstheinteractionwiththeterminal.
PRINTwithnoargumentclearstheterminal.

product

Syntax:product(Expr||Lst,[Var||Lst],[Intg(a)],[Intg(b)],[Intg(p)])
Multiplicatesthevaluesoftheexpressionwhenthevariablegoesfromatobwithastepp(product
expression,var,begin,end,step)bydefaultp=1)orproductoftheelementsofalistorproductelementby
elementof2listsormatrix.
Example:product(n,n,1,10,2)returns945

projection

Syntax:projection(Curve,Point)
Drawstheorthogonalprojectionofapointontoacurve.
Example:projection(circle(x^2+y^2=4),point(6,6))createsapointonthecircleat(2,2)

proot

Syntax:proot(Vect||Poly)
Returnsallcomputedrootsofapolynomialgivenbyitscoefficients(maynotworkifrootsarenot
simple).
Example:proot([1,0,2])returns[1.41421356237,1.41421356237]

propfrac

Syntax:propfrac(FracorRatFrac)
Simplifiesandwritesthefraction(orrationnalfraction)A/BasQ+R/BwithR<B(ordeg(R)<deg(B))
Example:propfrac(28/12)returns2+1/3

Psi

Syntax:Psi(Real(a),Intg(n))
Psi(a,n)returnsthenthderivativeofthedigammafunctionatx=a(Psi(a,0)=Psi(a))
Example:Psi(3,1)returns^2/65/4

ptayl

Syntax:ptayl(Poly(P(var)),Real(a),[Var])
ReturnstheTaylorpolynomialQsuchasP(x)=Q(xa)
Example:ptayl(x^2+2*x+1,1)returnsx^2+4*x+4

purge

Syntax:purge(Var)
purge(varname)unassignsthevariablevarname

PXC

Syntax:PXC(x,y)orPXC({x,y})
Transformpixelcoordinatesintocartesiancoordinates.Returnsalist.

q2a

Syntax:q2a(QuadraForm,VectVar)
q2a(q(x,y),[x,y])returnsthesymmetricmatrixassociatedwiththequadraticformq
Example:q2a(x^2+2*x*y+2*y^2,[x,y])returns[[1,1],[1,2]]

QR

Syntax:QR(matrix)
QRFactorization.Factorsanmnmatrixintothreematrices:
{[[mmorthogonal]],[[mnuppertrapezoidal]],[[nnpermutation]]}.
Example:QR([[1,2],[3,4]])

quadrilateral

Syntax:quadrilateral(Point1,Point2,Point3,Point4)
Drawsaquadrilateralfromasetoffourpoints.
Example:quadrilateral(GA,GB,GC,GD)drawsquadrilateralABCD.

quantile

Syntax:quantile(Lst(l),Real(p))
Returnsthequantileoftheelementsoflcorrespondingtop(0<p<1)
Example:quantile([0,1,3,4,2,5,6],0.25)returns[1.0]

quartile1

Syntax:quartile1(Lst||Mtrx,[Lst])
Returnsthe1stquartileoftheelements(orofthecolumns)oftheargument.
Example:quartile1([1,2,3,5,10,4])returns2.0

quartile3

Syntax:quartile3(Lst||Mtrx,[Lst])
Returnsthe3rdquartileoftheelements(orofthecolumns)oftheargument
Example:quartile3([1,2,3,5,10,4])returns5.0

Page37of53

Command

Description

quartiles

Syntax:quartiles(Lst||Mtrx,[Lst])
Returnsthemin,1stquartile,median,3rdquartile,andmaxoftheelements(orofthecolumns)ofthe
argument.
Example:quartiles([1,2,3,5,10,4])returns[[1.0],[2.0],[3.0],[5.0],[10.0]]

quo

Syntax:quo((VectorPoly),(VectorPoly),[Var])
ReturnstheEuclideanquotientof2polynomials
Example:quo([1,2,3,4],[1,2])returnspoly1[1,4,11]

quorem

Syntax:quorem(Poly1,Poly2)orquorem(Vector1,Vector2)
ReturnstheEuclideanquotientandremainderofthequotientof2polynomialsinavector.Ifthe
polynomialsareexpressedasvectorsoftheircoefficients,thenthiscommandreturnsasimilarvectorof
thequotientandavectoroftheremainder.
Examples:
quorem(x^3+2*x^2+3*x+4,x+2)returns[x^24*x11,26]
quorem([1,2,3,4],[1,2])returns[[1,4,11][26]]

QUOTE

Syntax:QUOTE(expression)
Returnstheexpressionunchangedandunevaluated.
ThisfunctionismostlyusedwiththeSTOcommandinordertostoreafunctioninafunctionvariable.
ForexampleifyouwanttostoreSIN(X)inF1.youcannotdoSIN(X)F1asSIN(X)wouldbeevaluatedand
anumericalresultwouldbestoredintoF1.QUOTE(SIN(X))F1willstoreSIN(X)inF1.

radical_axis

Syntax:radical_axis(Crcle,Crcle)
Returnsthelineofpointswithsamepowerpcwithrespecttothe2circles.

radius

Syntax:radius(Circle)
Returnstheradiusofacircle.
Example:IfGAisthepointat(0,0),GBisthepointat(1,0),andGCisdefinedascircle(GA,GBGA),then
radius(GC)returns1.

randexp

Syntax:randexp(Real(a))
Returnsarandomrealaccordingtotheexponentialdistributionofparametera>0
Example:randexp(1)returns1.17118631006

RANDINT

Syntax:RANDINT([a],[b],[c])
Randomnumber.Returnsapseudorandomintegergeneratedusingaseedvalue,andupdatestheseed
value.
Withnoargument,thisfunctionreturnsarandomintegerxfrom0to1.Withoneargument,thisreturns
arandomintegerxfrom0toa.Withtwoarguments,thisreturnsarandomintegerxfromatob.With
threearguments,thisreturnsalistofsizeawitheachelementbeingarandomintegerxfrombtoc.
Example:RANDINT(3,1,6)returns{random1,random2,random3}

RANDMAT

Syntax:RANDMAT(matrixname,rows,columns)
Createsarandommatrixwiththespecifiednumberofrowsandcolumns,andstorestheresultin
matrixname.Theentrieswillbeintegersrangingfrom99to99.
Example:RANDMAT(M1,2,2)returns[[n1,n2],[n3,n4]]

randMat

Syntax:ranm(Intg(n),[Intg(m)],[Intervalorquote(DistribLaw)])
Returnsalistofsizenoran*mmatrixthatcontainsrandomintegersintherange99through99with
uniformdistributionorcontainsrandomnumbersaccordingtothelawinquote.
Example:ranm(3)returns[20,72,86]

RANDNORM

Syntax:RANDNORM([],[])orRANDNORM(n,,)
Returnarandomnumberfromthenormaldistributionwiththespecifiedmeanandstandarddeviation
.Defaultvaluesare0and1.
Withthreearguments,returnsalistofsizenwitheachelementbeingarandomnumberfronthenormal
distributionwiththespecifiedmeanandstandarddeviation.
Example:RANDNORM(3,0,1)returns{random1,random2,random3}

randNorm

Syntax:randnorm(Real(mu),Real(sigma))
ReturnsarandomrealwithnormaldistributionN(mu,sigma)
Example:randnorm(0,1)returns0.860967215689

Page38of53

Command

Description

RANDOM

Syntax:RANDOM([a],[b],[c])
Randomnumber.Returnsapseudorandomnumbergeneratedusingaseedvalue,andupdatestheseed
value.
Withnoargument,thisfunctionreturnsarandomnumberxwith0x<1.Withoneargument,this
returnsarandomnumberxwith0x<a.Withtwoarguments,thisreturnsarandomnumberxwitha
x<b.Withthreearguments,thisreturnsalistofsizeawitheachelementbeingarandomnumberxwith
bx<c.
Example:RANDOM(3,0,10)returns{random1,random2,random3}

randperm

Syntax:randperm(Intg(n))
Returnsarandompermutationof[0,1,2,..,n1]
Example:randperm(4)returns[2,1,3,0]

randPoly

Syntax:randpoly([Var],Intgr,[Dist])
ReturnsavectorofcoefficientsofapolynomialofvariableVar(orx),ofdegreeIntgrandwherethe
coefficientsarerandomintegersintherange99through99withuniformdistributionorinaninterval
specifiedbyIntrvl.
Example:randpoly(t,8,1..1)returnsavectorof9randomintegers,allofthembetween1and1.

RANDSEED

Syntax:RANDSEED([value])
Setstherandomnumbergeneratorseed.Withnoinput,usescurrenttimevalueasseed.
Example:RANDSEED(3.14)

RANK

Syntax:RANK(matrix)
Rankofarectangularmatrix.
Example:RANK([[1,2],[3,4]])returns2

ratnormal

Syntax:ratnormal(Expr)
RewritesExprasanirreduciblerationalfraction
Example:ratnormal((x^21)/(x^31))returns(x+1)/(x^2+x+1)

RE

Syntax:RE(x+yi)
RealPart.Returnstherealpartofacomplexnumber.
Example:RE(3+4i)returns3

reciprocation

Syntax:reciprocation(Crcle,Lst(Pnt,Line))
Returnsthelistwhereapointisreplacedwithitspolaroralineisreplacedwithitspole,withrespectto
thecircleC

RECT

Syntax:RECT([G],[x1,y1],[x2,y2],[edgecolor],[fillcolor])
DrawsarectangleonG,withdiagonaldefinedbypoints(x1,y1)and(x2,y2),usingedgecolorforthe
perimeterandfillcolorfortheinside.
Thefollowingvaluesareoptionalandtheirdefaultsarelisted:
x1,y1=topleftcornerofG
x2,y2=bottomrightcornerofG
edgecolor=white
fillcolor=edgecolor
Note:ToeraseaGROB,executeRECT(G).ToclearthescreenexecuteRECT().

RECT_P

Syntax:RECT_P([G],[x1,y1],[x2,y2],[edgeColor],[fillColor])
DrawsarectangleonG,withdiagonaldefinedbypoints(x1,y1)and(x2,y2),usingedgeColorforthe
perimeterandfillColorfortheinside.
Thefollowingvaluesareoptionalandtheirdefaultsarelisted:
x1,y1=topleftcornerofG
x2,y2=bottomrightcornerofG
edgeColor=white
fillColor=edgeColor
Note:ToeraseaGROB,executeRECT(G).Toclearthescreen,executeRECT().

Page39of53

Command

Description

rectangle

Syntax:rectangle(Point1,Point2,Point3)orrectangle(Point1,Point2,Realk)
Drawsarectanglegiventwoconsecutiveverticesandapointonthesideoppositethesidedefinedbythe
firsttwoverticesorascalefactorforthesidesperpendiculartothefirstside.Aswithmanyoftheother
polygoncommands,youcanspecifyoptionalCASvariablenamesforstoringthecoordinatesoftheother
twoverticesaspoints.
Examples:
rectangle(GA,GB,GE)drawsarectanglewhosefirsttwoverticesarepointsAandB(onesideissegment
AB).PointEisonthelinethatcontainsthesideoftherectangleoppositesegmentAB.
rectangle(GA,GB,3,p,q)drawsarectanglewhosefirsttwoverticesarepointsAandB(onesideis
segmentAB).ThesidesperpendiculartosegmentABhavelength3*AB.Thethirdandfourthpointsare
storedintotheCASvariablespandq,respectively.

rectangular_
coordinates

Syntax:rectangular_coordinates(LstPolCoord)
Returnsthelistoftheabscissaandoftheordinateofapointgivenbythelistofitspolarcoordinates.
Example:rectangular_coordinates([1,1])returns[cos(1),sin(1)]

red

Syntax:('display')=[color]
Forexample,supposeyouhavedrawnacircleintheGeometryapp.InSymbolicview,thecircle's
definitionmightbeGC:=circle(GA,GBGA).Ifyouwantedthatcircletobe,say,red,youcouldmodifythat
definitiontoread:
Example:GC:=circle(GA,GBGA,('display')=red)

REDIM

Syntax:REDIM(matrixname,size)
Redimensionsthespecifiedmatrixorvectortosize.Foramatrix,sizeisalistoftwointegers{n1,n2}.For
avector,sizeisalistcontainingoneinteger{n}.Existingvaluesinthematrixarepreserved.Fillvalueswill
bezeros.

reduced_conic

Syntax:reduced_conic(Expr,[LstVar])
Returnstheoriginandthematrixofabaseinwhichtheconic(givenbyitsequation)isreduced,0or1(0
iftheconicisdegenerate),andtheequationoftheconicinthisbaseandalsoitsparametricequation
Example:reduced_conic(x^2+2*x2*y+1)returns[[1,0],[[0,1],[1,0]],1,y^2+2*x,[[1+(i)*(t*t/2+(i)*t),t,
4,4,0.1]]]

ref

Syntax:ref(Mtrx(M))
PerformsGaussreductionofamatrixAX=b(M=A|(b))
Example:ref([[3,1,2],[3,2,2]])returns[[1,1/3,2/3],[0,1,4]]

reflection

Syntax:reflection(line,Object)orreflection(Point,Object)
Reflectsageometricobjectoveralineorthroughapoint.Thelatterissometimesreferredtoasahalf
turn.
Examples:
reflection(line(x=3),point(1,1))reflectsthepointat(1,1)overtheverticallinex=3tocreateapointat
(5,1).
reflection(1+I,32i)reflectsthepointat(3,2)throughthepointat(1,1)tocreateapointat(1,4).

rem

Syntax:rem(Poly1,Poly2)orrem(Vector1,Vector2)
ReturnstheEuclideanremainderofthequotientof2polynomials.Ifthepolynomialsareexpressedas
vectorsoftheircoefficients,thenthiscommandreturnsasimilarvectoroftheremainder.
Examples:
rem(x^3+2*x^2+3*x+4,x+2)returns26
rem([1,2,3,4],[1,2])returns[26]

remove

Syntax:remove(FncBool(f)||e,Lst(l))
Removestheoccurenceseoflortheelementsesuchthatf(e)=true
Example:remove(x>x>=5,[1,2,6,7])returns[1,2]

reorder

Syntax:reorder(Expr,LstVar)
ReordersthevariablesinEaccordingtotheorderofthe2ndargument
Example:reorder(x^2+2*x+y^2,[y,x])returnsy^2+x^2+2*x

Page40of53

Command

Description

REPEAT

Syntax:REPEATcommand(s)UNTILtest;
executescommand(s)UNTILthetestistrue.
A:=5;
REPEAT
PRINT(A);
A:=A1;
UNTILA<1;
willprint54321

REPLACE

Syntax:REPLACE(object,start,object)
Replacesportionofamatrix,vectororstringstartingatstartbyobject.
Foramatrix,startisalistcontainingtwonumbers;foravectororstringitisasinglenumber.
Note:forstrings,youcando:REPLACE("string","sub_string","replace_string")

residue

Syntax:residue(Expr,Var(v),Cplx(a))
ReturnstheresidueinaoftheexpressionExprwithvasvariable
Example:residue(1/z,z,0)returns1

restart

Syntax:restart(NULL)
Purgesallthevariables

resultant

Syntax:resultant(Poly,Poly,Var)
Returnstheinertformoftheresultantformodularcomputation(irem/mod)

RETURN

Syntax:RETURNexpression;
Exitsfromafunctionandreturnsthevalueofexpression(optional).
Example:
EXPORTFACTORIAL(N)
BEGIN
IFN==1THENRETURN1;ELSERETURNN*FACTORIAL(N1);END;
END;

REVERSE

Syntax:REVERSE(list)
Reverselist.Reversestheorderoftheelementsinlistandreturnstheminanewlist.
Example:REVERSE({2,3,4,5})returns{5,4,3,2}.

revlist

Syntax:revlist(Lst(l))
Returnsthelistlinreverseorder
Example:revlist([1,2,3])returns[3,2,1]

RGB

Syntax:RGB(R,G,B,[A])
Returnsanintegernumberthatcanbeusedasthecolorparameterforadrawingfunction.Basedon
Red,GreenandBluecomponentsvalues(0to255).
IfAlphaisgreaterthan128,returnsthecolorflaggedastransparent.Thereisnoalphachannelblending
onPrime.

rhombus

Syntax:rhombus(Pnt(A)||Cplx,Pnt(B)||Cplx,Angle(a)||Pnt(P)||Lst(P,a)),[Var(C)],[Var(D)])
ReturnsanddrawstherhombusABCDsuchthattheangle(AB,AD)=aorsuchthatintheplaneABPthe
angle(AB,AD)=angle(AB,AP)

RIGHT

Syntax:RIGHT(string,n)
Returnsthelastncharactersofthestring.
Example:RIGHT("MOMOGUMBO",5)returns"GUMBO"

right

Sorry,butnoonlinehelpisavailableforthisitem.
Tobrowsethroughtheentirehelpsystem,tapTree.Youcanthenusethecursorkeystonavigate
throughthesystemandopenhelptopics.
Ifyoustillcannotfindthetopicyouareinterestedin,pleaseconsulttheUserGuide.
TapOKtoexitthispage.

right_triangle

Syntax:right_triangle(Point1,Point2,Realk)
Drawsarighttrianglegiventwopointsandascalefactor.Onelegoftherighttriangleisdefinedbythe
twopoints,thevertexoftherightangleisatthefirstpoint,andthescalefactormultipliesthelengthof
thefirstlegtodeterminethelengthofthesecondleg.
Example:right_triangle(GA,GB,1)drawsanisoscelesrighttriangleswithitsrightangleatpointA,and
withbothlegsequalinlengthtosegmentAB.

Page41of53

Command

Description

romberg

Syntax:romberg(Expr(f(x)),Var(x),Real(a),Real(b))
UsesRomberg'smethodtoreturntheapproximatevalueoftheintegraloftheexpressionoverthe
intervalatob
Example:romberg(exp(x^2),x,0,1)returns1.46265174591

ROTATE

Syntax:ROTATE(string,n)
Ifnisnotnegative,takesthefirstncharactersofstringandputthemontherightofstring.Ifnis
negative,takesthelastncharactersandputthemontheleftofstring.IfABS(n)>dim(string),returns
string.
Examples:
ROTATE("12345",2)returns"34512"
ROTATE("12345",1)returns"51234"
ROTATE("12345",6)returns"12345"

rotation

Syntax:rotate(Point,Angle,Object)
Rotatesageometricobject,aboutagivencenterpoint,throughagivenangle.
Example:rotate(GA,angle(GB,GC,GD),GK)rotatesthegeometricobjectlabeledK,aboutpointA,
throughanangleequaltoCBD.

ROUND

Syntax:ROUND(value,[places])
Roundsvaluetosystemdisplaysettings.Ifoptionalplacesisgiven,roundsvaluetoplacesdecimalplaces.
Ifplacesisnegative,roundstosignificantdigitsinstead.
ROUND(7.8676,2)returns7.87

row

Syntax:row(Mtrx(A),Intg(n)||Interval(n1..n2))
Returnstherownorthesequenceoftherowsn1..n2ofthematrixA
Example:row([[1,2,3],[4,5,6],[7,8,9]],1)returns[4,5,6]

rowAdd

Syntax:rowAdd(Mtrx(A),Intg(n1),Intg(n2))
ReturnsthematrixobtainedfrommatrixAwhenthen2throwisreplacedbythesumofthen1thand
n2throws
Example:rowAdd([[1,2],[3,4],[5,6]],1,2)returns[[1,2],[3,4],[8,10]]

rowDim

Syntax:rowDim(Mtrx)
Returnsthenumberofrowsofamatrix
Example:rowDim([[1,2,3],[4,5,6]])returns2

ROWNORM

Syntax:ROWNORM(matrix)
RowNorm.Findsthemaximumvalue(overallrows)forthesumsoftheabsolutevaluesofallelements
inarow.
Example:ROWNORM([[1,2],[3,4]])returns7

rowSwap

Syntax:rowSwap(Mtrx(A),Intg(n1),Intg(n2))
ReturnsthematrixobtainedfromAbyswappingthen1throwandthen2throw
Example:rowSwap([[1,2],[3,4],[5,6]],1,2)returns[[1,2],[5,6],[3,4]]

RREF

Syntax:RREF(matrix)
ReducedRowEchelonForm.Changesarectangularmatrixtoitsreducedrowechelonform.
Example:RREF([[1,2,1],[3,4,1]])returns[[1,0,.2],[0,1,.4]]

rsolve

Syntax:rsolve((ExprorLstExpr),(VarorLstVar),(InitValorLstInitVal))
Givesthevalueofarecurrentsequenceorofasystemofrecurrentsequences
Example:rsolve(u(n+1)=2*u(n)+n,u(n),u(0)=1returns[n+2*2^n1]

RB

Syntax:RB(Real[,bits[,base]])
Transformarealnumberintoaninteger.Optionallyspecifiesbitsandbase.
64<Bits<65
0<=Base<=4
0:system,1:bin,2:oct,3:dec,4:hex

SCALE

Syntax:SCALE(matrixname,value,rownumber)
Multipliesthespecifiedrow_numberofthespecifiedmatrixbyvalue.

SCALEADD

Syntax:SCALEADD(matrixname,value,row1,row2)
Multipliesthespecifiedrow1ofthematrixnamebyvalue,thenaddsthisresulttothesecondspecified
row2ofthematrixmatrixname.

Page42of53

Command

Description

SCHUR

Syntax:SCHUR(matrix)
SchurDecomposition.Factorsasquarematrixintotwomatrices.Ifmatrixisreal,thentheresultis
{[[orthogonal]],[[upperquasitriangular]]}.
IfComplexmodeisonandthematrixiscomplex,thentheresultis
{[[unitary]],[[uppertriangular]]}.
Example:SCHUR([[1,2],[3,4]])

SEC

Syntax:SEC(value)
Secant.TheSecantfunction;thatis,1/cos(x).
Example:SEC(0)returns1indegreemode

segment

Syntax:segment(Point1,Point2)
Drawsasegmentdefinedbyitsendpoints.
Examples:
segment(1+2i,4)drawsthesegmentdefinedbythepointswhosecoordinatesare(1,2)and(4,0).
segment(GA,GB)drawssegmentAB.

select

Syntax:select(FncBool(f),Lst(l))
Selectstheelementseoflsuchthatf(e)=true
Example:select(x>x>=5,[1,2,6,7])returns[6,7]

seq

Syntax:seq(Expr(Xpr),Intg(n)||Var(var),[Intg(a)],[Intg(b)],[Intg(p)])
Returnsthesequence(if2or3arguments)orthelist(if4or5arguments)obtainedwhenvargoesfrom
atob(stepp)inXpr,orwhenXprisrepeatedntimes.
Example:seq(2^k,k=0..8)returns1,2,4,8,16,32,64,128,256

seqsolve

Syntax:seqsolve((ExprorLstExpr),(VarorLstVar),(InitValorLstInitVal))
Givesthevalueofarecurrentsequence(u_{n+1}=f(u_n)oru_{n+2}=f(u_{n+1},u_n)...)orofasystemof
recurrentsequences
Example:seqsolve(2x+n,[x,n],1)returnsn1+2*2^n

series

Syntax:series(Expr,Equal(var=limit_point),[Order],[Dir(1,0,1)])
Returnstheseriesexpansionofanexpressioninthevicinityofagivenequalityvariable.Withthe
optionalthirdandfourthargumentsyoucanspecifytheorderanddirectionoftheseriesexpansion.Ifno
orderisspecifiedtheseriesreturnedis
fifthorder.Ifnodirectionisspecified,theseriesisbidirectional.
Example:series((x^4+x+2)/(x^2+1),x=0,5)returns2+x2x^2x^3+3x^4+x^5+x^6*order_size(x)

SETBASE

Syntax:SETBASE(#integer[,base])
Setsthebaseusedfordisplayofthisinteger.
Ifbaseisnotspecifiedthecalculatordefaultisused.
0<=Base<=4
0:system,1:bin,2:oct,3:dec,4:hex

SETBITS

Syntax:SETBITS(#integer[,bits])
Setsthenumberofbitsusedforcalculationswiththisintegertobits.
Ifbitsisnotspecifiedthecalculatordefaultisused.
64<Bits<65

shift_phase

Syntax:shift_phase(Expr)
Returnstheexpressionswherethephaseoftheevaluatedtrigonometricexpressionsisincreasedby/2
Example:shift_phase(sin(x))returnscos((+2*x)/2)

Si

Syntax:Si(Expr)
Sineintegralint(sin(t)/t,t=0..x)
Example:Si(1.0)returns0.946083070367

SIGN

Syntax:SIGN(value)orSIGN(x+yi)
Sign.Returnsthesignofvalue.Ifpositive,theresultis1;ifnegative,1.Ifzero,theresultiszero.For
complexinputsreturnstheunitvector.
Example:SIGN(2)returns1

signature

Syntax:signature(Permut)
Returnsthesignatureofapermutation
Example:signature([2,1,4,5,3])returns1

Page43of53

Command

Description

similarity

Syntax:similarity(Point,Realk,Angle,Object)
Dilatesandrotatesageometricobjectaboutthesamecenterpoint.
Example:similarity(0,3,angle(0,1,i),point(2,0))dilatesthepointat(2,0)byascalefactorof3(apointat
(6,0)),thenrotatestheresult90counterclockwisetocreateapointat(0,6)

simplify

Syntax:simplify(Expr)
Simplifiesanexpression.
Example:simplify(4*atan(1/5)atan(1/239))yields(1/4)*

simult

Syntax:simult(Mtrx(A),Mtrx(B))
ReturnsthematrixwherethecolumnofindexkissolutionofA*X=columnofindexkofB(=B[0..nr1,k..k]
withnr=numberofrowsofB)
Example:simult([[3,1],[3,2]],[[2],[2]])returns[[2],[4]]

SIN

SIN:thesinefunction.
Syntax:SIN(Value)
ReturnsthesineofValue.Valueisinterpretedaseitherdegreesorradians,dependingonthesettingof
AngleMeasureinHomeModesorSymbolicSetup.
Example:inradiansmode,SIN(/2)returns1

sin2costan

Syntax:sin2costan(Expr)
RewritesExprsothatsin(x)isreplacedbycos(x)*tan(x)
Example:sin2costan(sin(x))returnstan(x)*cos(x)

sincos

Syntax:sincos(Expr)
Returnsanexpressionwiththecomplexexponentialsrewrittenintermsofsineandcosine.
Example:sincos(exp(i*x))returnscos(x)i*sin(x)

single_inter

Syntax:single_inter(Curve,Curve,[Pnt(A)||LstPnt(L)])
Givesoneoftheintersectionsof2curvesorsurfaces(ortheintersectionnearAornotinL)

SINH

Syntax:SINH(value)
Hyperbolicsine.
Example:SINH(1)returns1.17520119364

SIZE

Syntax:SIZE(list)
ListSize.Returnsthenumberofelementsinlist.
Example:SIZE({0,1,2,3})returns4

slope

Syntax:slope(Line||Pnt||Cplx,[Pnt||Cplx])
Returnstheslopeofthelinedefinedintheargument
Example:slope(line(1,2i))returns2

slopeat

Syntax:slopeat(Segment,Point)orslopeat(Line,Point)orslopeat(Ray,Point)
Displays,withalegend,thevalueoftheslopeofthesegment,ray,orline(Linemaybeatangent,
bisector,etc.)atthelocationPointinPlotview.
Example:slopeat(line(point(0,1),point(3,2)),point(10,4))places"sline(point(0,1),point(3,2)=1/3"atthe
point(10,4)inPlotview

slopeatraw

Syntax:slopeatraw(Line,Pnt||Cplx(z0))
slopeatraw(d,z0)displaysthevalueoftheslopeofthelineorsegmentdatpoint(z0)

solve

Syntax:solve(Expr,[Var])
Solvesapolynomialequationorasetofpolynomialequations.
Example:solve(x^23=1)returns{2,2}

SORT

Syntax:SORT(list)
Sortlist.Sortstheelementsoflistinascendingorder.
Example:SORT({2,9,5,3})returns{2,3,5,9}.

SPECNORM

Syntax:SPECNORM(matrix)
SpectralNormofmatrix.
Example:SPECNORM([[1,2],[3,4]])returns5.46498570422

SPECRAD

Syntax:SPECRAD(matrix)
Spectralradiusofmatrix.
Example:SPECRAD([[1,2],[3,4]])returns5.37228132327

Page44of53

Command

Description

spline

Syntax:spline(Lst(lx),Lst(ly),Var(x),Intg(d))
Returnsthenaturalsplinethroughthepointsgivenbylxandly,variablex,degreed
Example:spline([0,1,2],[1,3,0],x,3)returns[5*x^3/4+13*x/4+1,5*(x1)^3/4+15*(x1)^2/4+(x1)/2+3]

sqrfree

Syntax:sqrfree(Expr)
Returnsapolynomialfactorizedasaproductofpowersofcoprimefactorswhereeachfactorhasrootsof
multiplicity1
Example:sqrfree(x^42*x^2+1)returns(x^21)^2

sqrt

Syntax:(Expr)
ReturnsthesquarerootofExpr
Example:50returns5*2

square

Syntax:square(Point1,Point2)
Drawsasquare,giventwoconsecutiveverticesaspoints.
Example:square(0,3+2i,p,q)drawsasquarewithverticesat(0,0),(3,2),(1,5),and(2,3).Thelasttwo
verticesarecomputedautomaticallyandaresavedintotheCASvariablespandq.

STARTAPP

Syntax:STARTAPP("AppName")
StartstheappAppName.TheApp'sSTARTfunctionwillrunifpresent.TheAppsdefaultviewwillbe
started.NotethattheSTARTfunctionisalwaysexecutedwhentheuserpressestheSTARTmenukeyin
theAppLibrary.AlsoworksforappssavedintheAppLibrary.

STARTVIEW

Syntax:STARTVIEW(ViewNumber[,Redraw])
Startsaviewofthecurrentapp.Redraw,isoptional;ifRedraw,istrue(non0),itwillforcearefreshfor
theview.
Theviewnumbersareasfollows:
0=Symbolic
1=Plot
2=Numeric
3=SymbolicSetup
4=PlotSetup
5=NumericSetup
6=AppInfo
7=ViewskeyIfthecurrentapphasviewsdefinedundertheViewsmenu,thenthefollowingview
numbersareused:
8=Firstspecialview(SplitScreenPlotDetail)
9=Secondspecialview(SplitScreenPlotTable)
10=Thirdspecialview(Autoscale)
11=Fourthspecialview(Decimal)
12=Fifthspecialview(Integer)
13=Sixthspecialview(Trig)IfViewNumberisnegative,thefollowingglobalviewsareused:
1=HomeScreen
2=Modes
3=MemoryManager
4=AppLibrary
5=MatrixCatalog
6=ListCatalog
7=ProgramCatalog
8=NoteCatalog

stddev

Syntax:stddev(Lst||Mtrx,[Lst])
Returnsthestandarddeviationoftheelementsinalistorofthelistofstandarddeviations
Example:stddev([1,2,3])returns(6)/3

stddevp

Syntax:stddevp(Lst||Mtrx,[Lst])
Returnsthepopulationstandardeviationoftheelementsofalistwiththesecondargumentasweight.
Example:stddevp([1,2,3])returns1

Page45of53

Command

Description

STEP

Syntax:FORvarFROMstartTO(orDOWNTO)finish[STEPincrement]DOcommand(s)END;
Setsvariablevartostart;then,foraslongasthisvariablesvalueislessthanorequalto(ormorethan
foraDOWNTO)finish,executescommand(s)andadds(orsubstractforDOWNTO)1(orincrement)to
var.
FORAFROM1TO10STEP2
DO
PRINT(A);
END;
willprint13579

sto

Syntax:sto(arg1,Var)
Storesthefirstargumentinthevariablegivenassecondargument
Example:sto("hello",b)

STRING

Syntax:STRING(expression)
Evaluatesexpressionandreturnstheresultasastring.

STRINGFROMID

Syntax:STRINGFROMID(integer)
ReturnsthebuiltinstringassociatedwiththeIDofthecurrentlanguage.

STUDENT

Syntax:STUDENT(n,x)
Studentstprobabilitydensityfunction.ComputestheprobabilitydensityoftheStudentstdistribution
atx,givenndegreesoffreedom.
Example:STUDENT(3,5.2)returns0.00366574413491

STUDENT_CDF

Syntax:STUDENT_CDF(n,x)
CumulativeStudentstdistributionfunction.ReturnsthelowertailprobabilityoftheStudentst
probabilitydensityfunctionatx,givenndegreesoffreedom.
Example:STUDENT_CDF(3,3.2)returns0.0246659214813

STUDENT_ICDF

Syntax:STUDENT_ICDF(n,p)
InversecumulativeStudentstdistributionfunction.ReturnsthevaluexsuchthattheStudentstlower
tailprobabilityofx,withndegreesoffreedom,isp.
Example:STUDENT_ICDF(3,0.0246659214813)returns3.2

sturmab

Syntax:sturmab(Poly,Var,Cplx1,Cplx2)
Returnsthenumberofsignchangesofapolynomialintheinterval(Cplx1,Cplx2]orthenumberof
complexrootsin(Cplx1,Cplx2]ifCplx1orCplx2isnonreal.
Example:sturmab(x^31,x,2,5)returns1

sturmseq

Syntax:sturmseq(Poly,[Var])
ReturnstheSturmsequencecorrespondingtoapolynomialortoarationalfraction
Example:sturmseq(x^31,x)returns[1,[[1,0,0,1],[3,0,0],9],1]

SUB

Syntax:SUB(object,start,end)
Extractsaportion,ofalistormatrix.
Foramatrix,startandendaretwolistsoftwonumbers({row,col})specifyingthetopleftandbottom
rightoftheportiontoextract.
Foravectororlist,startandendaretwonumbersspecifyingtheindexesofthefirstandlastobjectsof
theportiontoextract.

SUBGROB

Syntax:SUBGROB(srcG,[x1,y1],[x2,y2],trgtG)
SetsgraphictrgtGtobeacopyoftheareaofsrcGbetweenpoints(x1,y1)and(x2,y2).Ifboth(x1,y1)and
(x2,y2)arenotspecified,thentheentiregraphicsrcGisused.If(x1,y1)isnotspecified,thenthetopleft
cornerofsrcGisused;if(x2,y2)isnotspecified,thenthebottomrightcornerofsrcGisused.
trgtGRBcanbeanyofthegraphicvariablesexceptG0.
SUBGROB(G1,G4)willcopyG1inG4.

SUBGROB_P

Syntax:SUBGROB_P(srcG,[x1,y1],[x2,y2],trgtG)
SetsgraphictrgtGtobeacopyoftheareaofsrcGbetweenpoints(x1,y1)and(x2,y2).Ifboth(x1,y1)and
(x2,y2)arenotspecified,thentheentiregraphicsrcGisused.If(x1,y1)isnotspecified,thenthetopleft
cornerofsrcGisused;if(x2,y2)isnotspecified,thenthebottomrightcornerofsrcGisused.
trgtGRBcanbeanyofthegraphicvariablesexceptG0.
SUBGROB(G1,G4)willcopyG1inG4.

Page46of53

Command

Description

subMat

Syntax:subMat(Mtrx(A),Intg(n1),Intg(n2),Intg(n3),Intg(n4))
Extractsasubmatrixwithfirstelement=A[n1,n2]andlastelement=A[n3,n4]
Example:subMat([[1,2],[3,4],[5,6]],1,0,2,1)returns[[3,4],[5,6]]

subst

Syntax:subst(Expr,Var=value)
Substitutesavalueforavariableinanexpression.
Example:subst(x/(4x^2),x=3)returns3/5

sum

Syntax:sum(Expr,Var,Real1,Real2,[Step])
ReturnsthediscretesumofExprwithrespecttothevariableVarfromReal1toReal2.Youcanalsouse
thesummationtemplateintheTemplatemenu.
Example:sum(n^2,n,1,5)returns55

sum_riemann

Syntax:sum_riemann(Expr,List(Var1,Var2))
Returns,intheneighbourhoodofn=,anequivalentofthesumofExpr(Var1,Var2)forVar2fromVar2=1
toVar2=Var1whenthesumislookedatasaRiemannsumassociatedwithacontinuousfunctiondefined
on[0,1]
Example:sum_riemann(1/(n+k),[n,k])returnsln(2)

suppress

Syntax:suppress(Vect(l),Intg(n))
Returnslwithouttheelementofindexn
Example:suppress([0,1,2,3],2)returns[0,1,3]

surd

Syntax:surd(Expr,Intg(n))
ReturnsExprtothepowerof1/n
Example:surd(8,3)returns8^(1/3)

SVD

Syntax:SVD(matrix)
SingularValueDecomposition.Factorsanmnmatrixintotwomatricesandavector:{[[mmsquare
orthogonal]],[[nnsquareorthogonal]],[real]}.
Example:SVD([[1,2],[3,4]])

SVL

Syntax:SVL(matrix)
SingularValues.Returnsavectorcontainingthesingularvaluesofmatrix.
Example:SVL([[1,2],[3,4]])

SWAPCOL

Syntax:SWAPCOL(matrixname,column1,column2)
SwapColumns.Exchangescolumn1andcolumn2inthespecifiedmatrixmatrixname.

SWAPROW

Syntax:SWAPROW(matrixname,row1,row2)
SwapRows.Exchangesrow1androw2inthespecifiedmatrixmatrixname.

sylvester

Syntax:sylvester(Poly,Poly,Var)
ReturnstheSylvestermatrixoftwopolynomials
Example:sylvester(x^21,x^31,x)returns[[1,0,1,0,0],[0,1,0,1,0],[0,0,1,0,1],[1,0,0,1,0],[0,1,0,0,1]]

symb2poly

Syntax:symb2poly(Expr,[Var])orsymb2poly(Expr,ListVar)
ReturnsthecoefficientsofapolynomialExprwithrespecttothevariableVarorifthesecondargumentis
alistreturnstheinternalformatofthepolynomial.Essentaiillytheinverseofpoly2symb().
Example:symb2poly((x+2)*x+3)returns[1,2,3]

table

Syntax:table(SeqEqual(index=value))
Definesanarraywheretheindexarestringsorrealnumbers

tail

Syntax:tail(LstorSeqorStr)
Returnsthelist(orsequenceorstring)withoutitsfirstelement
Example:tail([3,2,4,1,0])returns[2,4,1,0]

TAN

TAN:thetangentfunction.
Syntax:TAN(Value)
ReturnsthetangentofValue.Valueisinterpretedaseitherdegreesorradians,dependingonthesetting
ofAngleMeasureinHomeModesorSymbolicSetup.
Example:inradiansmode,TAN(0)returns0

tan2cossin2

Syntax:tan2cossin2(Expr)
RewritesExprwithtan(x)replacedby(1cos(2*x))/sin(2*x)
Example:tan2cossin2(tan(x))returns(1cos(2*x))/sin(2*x)

Page47of53

Command

Description

tan2sincos

Syntax:tan2sincos(Expr)
RewritesExprwithtan(x)usingsin(x)/cos(x)
Example:tan2sincos(tan(x))returnssin(x)/cos(x)

tan2sincos2

Syntax:tan2sincos2(Expr)
RewritesExprwithtan(x)replacedbysin(2*x)/(1+cos(2*x))
Example:tan2sincos2(tan(x))returnssin(2*x)/(1+cos(2*x))

tangent

Syntax:tangent(Curve,Point)
Drawsthetangent(s)toagivencurvethroughagivenpoint.Thepointdoesnothavetobeapointonthe
curve.
Examples:
tangent(plotfunc(x^2),point(1,1))drawsthetangenttothegraphy=x^2throughthepoint(1,1);thatis,
thelinewhoseequationisy=2*x1.
tangent(plotfunc(x^2),GA)drawsthetangenttothegraphofy=x^2throughpointA.PointAcanthenbe
movedandthetangentwillmovewithit.
tangent(circle(GB,GCGB),GA)drawsoneormoretangentlinesthroughpointAtothecirclewhose
centerisatpointBandwhoseradiusisdefinedbysegmentBC.

TANH

Syntax:TANH(value)
Hyperbolictangent.
Example:TANH(1)returns.761594155956

taylor

Syntax:taylor(Expr,[Var=Value],[Order])
ReturnstheTaylorseriesexpansionofanexpressionatapointoratinfinity(bydefault,atx=0andwith
relativeorder=5).
Example:taylor(sin(x)/x,x=0)returns1(1/6)*x^2+(1/120)*x^4+x^6*order_size(x)

tchebyshev1

Syntax:tchebyshev1(Integer))
ReturnsthenthTchebyshevpolynomialofthefirstkind.
Example:tchebyshev1(3)returns4*x^33*x

tchebyshev2

Syntax:tchebyshev2(Integer)
ReturnsthenthTchebyshevpolynomialofthesecondkind.
Example:tchebyshev2(3)returns8*x^34*x

tcollect

Syntax:tcollect(Expr)
Collectstrigonometricexpressions.
Example:tcollect(sin(x)+cos(x))returns2*cos(x1/4*)

texpand

Syntax:texpand(Expr)
Expandsatranscendentalexpression;thatis,anexpressioncontainingtrigonometric,logarithmic,or
exponentialfunctions.texpanddevelopstheexpressionintermsofsin(),cos(),ln(),andexp().
Example:texpand(sin(2*x)+exp(x+y))returns2*cos(x)*sin(x)+exp(x)*exp(y)

TEXTOUT

Syntax:TEXTOUT(text,[G],x,y,[font],[textColor],[width],[backgroundColor])
DrawstextongraphicGatposition(x,y)usingfont.Paintsthebackgroundbeforedrawingthetextusing
colorbackgroundColor.Ifwidthisspecified,doesnotdrawtextmorethanwidthpixelswide.If
backgroundColorisnotspecified,thebackgroundisnoterased.
Thesizesforfontare:
0=currentfont(default)
1=font_10
2=font_12(Small)
3=font_14(Medium)
4=font_16(Large)
5=font_18
6=font_20
7=font_22

Page48of53

Command

Description

TEXTOUT_P

Syntax:TEXTOUT_P(text,[G],x,y,[font],[textColor],[width],[backgroundColor])
DrawstextongraphicGatposition(x,y)usingfont.Paintsthebackgroundbeforedrawingthetextusing
colorbackgroundColor.Ifwidthisspecified,doesnotdrawtextmorethanwidthpixelswide.If
backgroundColorisnotspecified,thebackgroundisnoterased.
Thesizesforfontare:
0=currentfont(default)
1=font_10
2=font_12(Small)
3=font_14(Medium)
4=font_16(Large)
5=font_18
6=font_20
7=font_22

THEN

Startsan"IF...THEN...END"or"IF...THEN...ELSE...END"branchstructure.
Syntax:IFtestTHENcommand(s)[ELSEcommands]END;
Evaluatestest.Iftestistrue(non0),executescommand(s);otherwise,executesthecomandsintheELSE
clausenothinghappens.
IFA<1
THENPRINT("AISSMALLERTHAN1");
ELSEPRINT("AISLARGERTHAN1");
END;

tlin

Syntax:tlin(Expr)
Returnsatrigonometricexpressionwiththeproductsandintegerpowerslinearized
Example:tlin(sin(x)^3)returns(3/4)*sin(x)(1/4)*sin(3*x)

TO

Syntax:FORvarFROMstartTO(orDOWNTO)finish[STEPincrement]DOcommand(s)END;
Setsvariablevartostart;then,foraslongasthisvariablesvalueislessthanorequalto(ormorethan
foraDOWNTO)finish,executescommand(s)andadds(orsubstractforDOWNTO)1(orincrement)to
var.
FORAFROM1TO10STEP2
DO
PRINT(A);
END;
willprint13579

TRACE

Syntax:TRACE(matrix)
Traceofasquarematrix.Findsthetraceofasquarematrix,equaltothesumofthediagonalelements(
alsoequaltothesumoftheeigenvalues).
Example:TRACE([[1,2],[3,4]])returns5

trace

Syntax:trace(Point)
Beginstracingthespecifiedpoint.

translation

Syntax:translation(Vector,Object)
Translatesageometricobjectalongagivenvector.Thevectorisgivenasthedifferenceoftwopoints
(headtail).
Examples:
translation(0i,GA)translatesobjectAdownoneunit.
translation(GBGA,GC)translatesobjectCalongthevectorAB.

transpose

Syntax:tran(Mtrx)
Transposesamatrix(withoutconjugation)
Example:tran([[1,2,3],[1,3,6],[2,5,7]])returns[[1,1,2],[2,3,5],[3,6,7]]

triangle

Syntax:triangle(Point1,Point2,Point3)
Drawsatriangle,givenitsthreevertices.
Example:triangle(GA,GB,GC)drawsABC.

Page49of53

Command

Description

TRIANGLE

Syntax:TRIANGLE([G],x1,y1,x2,y2,x3,y3,c1,[c2,c3],[Alpha],["ZString",z1,z2,z3])orTRIANGLE([G],
{x1,y1,[c1],[z1]},{x2,y2,[c2],[z2]},{x3,y3,[c3],[z3]},["ZString"])orTRIANGLE([G],[[x/ycoordinate
matrix]],[[colormatrix]],{[[zmatrix]],[zcode],[[[projectionmatrix]]],[zstring])orTRIANGLE([G])
Drawsatrianglebetweenspecifiedcartesiancoordinatesinthegraphicusingthespecifiedcolorand
transparency(0Alpha255).If3colorsarespecified,blendsthecolorsinbetweenthevertexes.
ThenextformofTRIANGLEallowsdisplayofmultipletrianglesatatime.
Thisismostlyusedifyouhaveasetofverticesandwanttodisplaythemallatonce.
Thefirst2matricesindicatethex/ycoordinatesandcolorsofeachpoints.TRIANGLEwilldraw1
quadrilateralforeachsetof4adjacentverticesandblendsthecolorsassociatedwiththe4points.
Ifazandprojectionmatrixareprovided,foreachpoint,thismatrixismultipliedbythe[x,y,z,1]vectorto
createthedisplayx,ycoordinates.
Ifzcodeisalistthatcontains3realnumbers{ex,ey,ez}thenx,yarefurthermodifiedbydoingx=ez/z*x
exandy=ez/z*yeycreatingaperspectiveprojection.
Ifzstringisprovided,zclippingwillhappenusingthezvalue(seebelow).
Ifzcode="N"orisalistthatstartswith"N",theneachzisnormalizedtobebetween0and255.
AboutZString
TRIANGLE([G])returnsastringadaptedforzclipping.
TouseZclipping,callTRIANGLEtocreateaZclippingstring(initializedat255foreachpixels).Youcan
thencallTRIANGLEwithappropriatez(0255)valuesforeachofthetrianglevertexesandTRIANGLEwill
notdrawpixelsfurtherthanthealreadydrawnpixels.ZStringisautomaticallyupdatedasappropriate.
Examples:TRIANGLE(0,0,5,5,5,5,#FFh,#FF00h,#FF0000h,128)

TRIANGLE_P

Syntax:TRIANGLE_P([G],x1,y1,x2,y2,x3,y3,c1,[c2,c3],[Alpha],["ZString",z1,z2,z3])or
TRIANGLE_P([G],{x1,y1,[c1],[z1]},{x2,y2,[c2],[z2]},{x3,y3,[c3],[z3]},["ZString"])orTRIANGLE_P([G],
[[x/ycoordinatematrix]],[[colormatrix]],{[[zmatrix]],[zcode],[[[projectionmatrix]]],[zstring])or
TRIANGLE_P([G])
Drawsatrianglebetweenspecifiedpixelcoordinatesinthegraphicusingthespecifiedcolorand
transparency(0Alpha255).If3colorsarespecified,blendsthecolorsinbetweenthevertexes.
ThenextformofTRIANGLEallowsdisplayofmultipletrianglesatatime.
Thisismostlyusedifyouhaveasetofverticesandwanttodisplaythemallatonce.
Thefirst2matricesindicatethex/ycoordinatesandcolorsofeachpoints.TRIANGLE_Pwilldraw1
quadrilateralforeachsetof4adjacentverticesandblendsthecolorsassociatedwiththe4points.
Ifazandprojectionmatrixareprovided,foreachpoint,thismatrixismultipliedbythe[x,y,z,1]vectorto
createthedisplayx,ycoordinates.
Ifzcodeisalistthatcontains3realnumbers{ex,ey,ez}thenx,yarefurthermodifiedbydoingx=ez/z*x
exandy=ez/z*yeycreatingaperspectiveprojection.
Ifzstringisprovided,zclippingwillhappenusingthezvalue(seebelow).
Ifzcode="N"orisalistthatstartswith"N",theneachzisnormalizedtobebetween0and255.
AboutZString
TRIANGLE_P([G])returnsastringadaptedforzclipping.
TouseZclipping,callTRIANGLE_PtocreateaZclippingstring(initializedat255foreachpixels).Youcan
thencallTRIANGLE_Pwithappropriatez(0255)valuesforeachofthetrianglevertexesandTRIANGLE_P
willnotdrawpixelsfurtherthanthealreadydrawnpixels.ZStringisautomaticallyupdatedas
appropriate.
Examples:TRIANGLE_P(0,20,150,50,100,100,#FFh,#FF00h,#FF0000h,128)

trig2exp

Syntax:trig2exp(Expr)
ReplacestrigonometricfunctionsinExprwithcomplexexponentials(withoutlinearization).
Example:trig2exp(sin(x))returns(exp(i*x)(1/exp(i*x)))/(2*i)

trigcos

Syntax:trigcos(Expr)
SimplifiestheargumentExprusingtheformulassin(x)^2+cos(x)^2=1andtan(x)=sin(x)/cos(x)(privileging
cosine)
Example:trigcos(sin(x)^4+sin(x)^2)returnscos(x)^43*cos(x)^2+2

trigexpand

Syntax:trigexpand(Expr)
Expandstrigonometricfunctions.
Example:trigexpand(sin(3*x))returns(4*cos(x)^21)*sin(x)

trigsin

Syntax:trigsin(Expr)
SimplifiestheargumentExprusingtheformulassin(x)^2+cos(x)^2=1andtan(x)=sin(x)/cos(x)(privileging
sine)
Example:trigsin(cos(x)^4+sin(x)^2)returnssin(x)^4sin(x)^2+1

Page50of53

Command

Description

trigtan

Syntax:trigtan(Expr)
SimplifiestheargumentExprusingtheformulassin(x)^2+cos(x)^2=1andtan(x)=sin(x)/cos(x)(privileging
tangent)
Example:trigtan(cos(x)^4+sin(x)^2)returns(tan(x)^4+tan(x)^2+1)/(tan(x)^4+2*tan(x)^2+1)

TRN

Syntax:TRN(matrix)
Transpose.Transposesmatrix.IfComplexmodeisonandthematrixcontainscomplexelements,then
TRNfindstheconjugatetranspose.
Example:TRN([[1,2],[3,4]])returns[[1,3],[2,4]]

trunc

Syntax:trunc(Real,[Integer])ortrunc(List,[Integer])
Truncatesavaluetondecimalplaces(bydefaultn=0).Acceptscomplexnumbers.
Examples:
trunc(4.3)returns4
trunc({3.25,8.71,9.01},1)returns{3.2,8.7,9.}

TRUNCATE

Syntax:TRUNCATE(value,[places])
Truncatesvaluetosystemdisplaysettings.Ifoptionalplacesisgiven,truncatesvaluetoplacesdecimal
places.Ifplacesisnegative,truncatestosignificantdigitsinstead.
Example:TRUNCATE(2.3678,2)returns2.36

tsimplify

Syntax:tsimplify(Expr)
Returnsanexpressionwithtranscendentalsrewrittenascomplexexponentials
Example:tsimplify(exp(2*x)+exp(x))returnsexp(x)^2+exp(x)

type

Syntax:type(Expr)
Returnsnin[1..12]thatdefinesthetypeoftheargument
Example:type("abc")returnsDOM_STRING

TYPE

Syntax:TYPE(object)
Returnsthetypeoftheobject:
0:Real
1:Integer
2:String
3:Complex
4:Matrix
5:Error
6:List
8:Function
9:Unit
14.?:casobject.thefractionalpartisthecastype

UFACTOR

Syntax:UFACTOR(Value_Unit1,1_Unit2)
Unitfactorconversion.
Convertsameasurementusingacompoundunitintoameasurementexpressedinconstituentunits.
Examples:aCoulombameasureofelectricchargeisacompoundunitderivedfromtheSIbaseunits
ofAmpereandsecond:1C=1A*1s.UsingUFACTOR,youcanexpressameasurementinCoulombsas
aproductofAmperesandtime.
UFACTOR(100_C,1_A))returns100_A*s
UFACTOR(100_C,1_min)returns1.66666666667_min*A

unapply

Syntax:unapply(Expr,Var)
Returnsafunctiondefinedbyanexpression.
Example:unapply(2*x^2,x)returns(x)>2*x^2

UNCHECK

Syntax:UNCHECK(n)
Unchecks(deselects)thecorrespondingsymbolicdefinitionfieldinthecurrentapp.Theintegernmust
bebetween0and9formostapps.ForStatistics1VarandStatistics2Varapps,nmustbebetween1
and5.
Forexample,UNCHECK(3)woulduncheckF3ifthecurrentappisFunction.

Page51of53

Command

Description

UNTIL

Syntax:REPEATcommand(s)UNTILtest;
executescommand(s)UNTILthetestistrue.
A:=5;
REPEAT
PRINT(A);
A:=A1;
UNTILA<1;
willprint54321

USIMPLIFY

Syntax:USIMPLIFY(Value_Unitsexpr)
Unitsimplification.SimplifiesValueinacomplexunitexpressionUnitsexprtoanequivalentvalueina
simplerunitexpression.
Examples:
aJouleisdefinedas1kg*m^2/s^2.
USIMPLIFY(5_kg*m2/s2)returns5_J

valuation

Syntax:valuation(Poly(P))
Returnsthevaluation(degreeofthetermoflowestdegree)ofthepolynomialP.
Example:valuation(x^4+x^3)returns3

vandermonde

Syntax:vandermonde(Vect(V))
ReturnstheVandermondematrix=[V^0,V^1,..]
Example:vandermonde([1,2,3])returns[[1,1,1],[1,2,4],[1,3,9]]

variance

Syntax:variance(Lst||Mtrx,[Lst])
Returnsthevarianceofalistwiththesecondargumentastheweight,orthelistofvarianceofthe
columnsofamatrix.
Example:variance([3,4,2])returns2/3

vector

Syntax:vector(Pnt,Pnt||Pnt,Vect)
Definesavector(originis0if1arg)withtwopointsortwocomponentsortwoaffix(for2D)orwitha
pointandavectororwithapoint(itsextrmityanditsoriginis[0,0,0]).

vertices

Syntax:vertices(PolygonorPolyedr(P))
ReturnsthelistoftheverticesofthepolygonorpolyhedronP.

vertices_abca

Syntax:vertices_abca(PolygonorPolyedr(P))
Returnstheclosedlist[A,B,...A]oftheverticesofthepolygonorpolyhedronP.

VIEW

Syntax:VIEW"text",Function()
VIEW.AllowsaprogrammertocustomizetheViewsmenu.Causes"text"toapearwhenVIEWkeyis
pressedandFunctiontobeexecutedwhentheOKmenukey(orENTERkey)ispressed.

vpotential

Syntax:vpotential(Vect(V),LstVar)
ReturnsUsuchascurl(U)=V
Example:vpotential([2*x*y+3,x^24*z,2*y*z],[x,y,z])returns[0,2*x*y*z,x^3/3+4*x*z+3*y]

WAIT

Syntax:WAIT(n)
Haltsprogramexecutionforthespecifiednumberofseconds.
Ifnisomittedor0,haltsexecutionuntiltheuserpressesakeyandreturnsthekeycode(or1after1
minute).
Ifnis1,haltsexecutionsuntiltheuserpressesakeyorthereisamouseevent.
Ifakeyispressed,thekeycodeisreturned.
Aftera1minutetimeout,returns1
Ifamouseeventhappends,alistoftheform{type,[x,y],[dx,dy]}isreturned.Normallyx/yistheevent
positionunlessotherwiseindicated.
Typecanbe:
0:MouseDown
1:MouseMove
2:MouseUp(x/yisnotprovided)
3:MouseClick(note,ifaclickisdetected,thereisnoMouseUp)
5:MouseStretch.x/yisthedeltasincethelastevent.dx/dyisthedeltasincetheORIGINALmouse
down...
6:MouseRotate,xisoriginalangle,yisnewanglein32ndofacircle.
7:MouseLongClick,Thismeansthatthemousestayeddownfor1second...Example:
WAIT(5)haltsprogramexecutionfor5seconds.

Page52of53

Command

Description

when

Syntax:when(Cond,Expr1,Expr2)
Ifcondition(evensymbolic)returnsexpr1elsereturnsexpr2(?istheinfixedversionofwhen).

WHILE

Syntax:WHILEtestDOcommand(s)END;
executescommand(s)WHILEthetestistrue.
A:=5;
WHILEA>1DO
PRINT(A);
A:=A1;
END;
willprint54321

white

Syntax:white(Opt)
Optionofthedisplaycommandtodisplaywithcolor.

XOR

Syntax:Value1XORValue2
ExclusiveOR.
Returns1ifeitherValue1orValue2isnonzerobutnotboth;otherwise,returns0.
Example:3XOR2returns0

XPON

Syntax:XPON(value)
Exponent.Returnstheexponentofvalue.
Example:XPON(123.4)returns2

yellow

Syntax:('display')=[color]
Forexample,supposeyouhavedrawnacircleintheGeometryapp.InSymbolicview,thecircle's
definitionmightbeGC:=circle(GA,GBGA).Ifyouwantedthatcircletobe,say,red,youcouldmodifythat
definitiontoread:
Example:GC:=circle(GA,GBGA,('display')=red)

zeros

Syntax:zeros(Expr,[Var])
Returnsthezeros(realsorcomplexaccordingtotheCASsettings)oftheexpressionExprforthevariable
Var(orthematrixwherethelinesarethesolutionsofthesystem:Expr1=0,Expr2=0...).
Example:zeros(x^2+4)returns[]inrealmodeand[2*i,2*i]incomplexmode

Zeta

Syntax:Zeta(Real(a))
Returnsifa>1sum(1/n^a,n,1,)
Example:Zeta(2)returns^2/6

zip

Syntax:zip(Fnc2d(f),Lst(l1),Lst(l2),[Val(default)])
Returnsalistwhosejthentryisf(l1[j],l2[j]):withoutdefaultvalueitslengthistheminimumofthe
lengthsofthetwoinputlistsandelsetheshorterlistispaddedwiththedefaultvalue.
Example:zip('+',[a,b,c,d],[1,2,3,4])returns[a+1,b+2,c+3,d+4]

ztrans

Syntax:ztrans(Expr,[Var],[ZtransVar])
Ztransformofasequence.
Example:ztrans(a^x)

Page53of53

S-ar putea să vă placă și