190 Appendix A: Functions and Instructions
fPart() MATH/Number menu
fPart(
expression1
) ⇒
expression
fPart(
list1
) ⇒
list
fPart(
matrix1
) ⇒
matrix
Returns the fractional part of the argument.
For a list or matrix, returns the fractional parts of
the elements.
The argument can be a real or a complex number.
fPart(ë 1.234) ¸ ë.234
fPart({1, ë 2.3, 7.003})
¸
{0 ë.3 .003}
Func CATALOG
Func
block
EndFunc
Required as the first statement in a multi-
statement function definition.
block
can be either a single statement or a series
of statements separated with the “:” character.
Note:
when() also can be used to define and
graph piecewise-defined functions.
In function graphing mode, define a piecewise
function:
Define g(x)=Func:If x<0 Then
:Return 3ù cos(x):Else:Return
3ì x:EndIf:EndFunc
¸ Done
Graph g(x)
¸
gcd() MATH/Number menu
gcd(
number1, number2
) ⇒
expression
Returns the greatest common divisor of the two
arguments. The
gcd of two fractions is the gcd
of their numerators divided by the lcm of their
denominators.
In Auto or Approximate mode, the
gcd of
fractional floating-point numbers is 1.0.
gcd(18,33) ¸ 3
gcd(
list1, list2
) ⇒
list
Returns the greatest common divisors of the
corresponding elements in
list1
and
list2
.
gcd({12,14,16},{9,7,5}) ¸
{3 7 1}
gcd(
matrix1, matrix2
) ⇒
matrix
Returns the greatest common divisors of the
corresponding elements in
matrix1
and
matrix2
.
gcd([2,4;6,8],[4,8;12,16])
¸
[
2 4
6 8
]
Get CATALOG
Get
var
Retrieves a CBL 2é/CBL™ (Calculator-Based
Laboratoryé) or CBRé (Calculator-Based
Rangeré) value from the link port and stores it in
variable
var
.
Program segment:
©
:Send {3,1,ë 1,0}
:For i,1,99
: Get data[i]
: PtOn i,data[i]
:EndFor
©