- TI nspire
[function] part() // nspire 레퍼런스 가이드북에 없는 함수
1. part()
"Error: Argument must be a Boolean expression or integer"
1.1 part(data) ⇒ (number) index
- data 에서 (계산 우선순위상) 처음 실행되는 function(기능) 이 포함하고 있는 요소(argument) 의 갯수를 반환함.
- data==list,
list 의 element 갯수 - data==matrix,
matrix 열(row) 갯수 - data==expression,
수식에 포함된 기능(연산자(+ - × ÷ ^...) / 함수(cos()...) / "and" / "or" 등등) 중에서, 뭐가 됐든 우선순위가 제일 높은 것에 필요한 요소(argument)의 갯수를 반환함.
1.2 part(data, index)
- index==0 일 때,
data에 포함된 기능을 string 형식으로 반환합니다.
예) "{", "or", "+", "/" - data==list,
list 의 index에 해당하는 요소를 반환 - data==matrix,
matrix index에 해당하는 열(row) 를 list 형식으로 반환 - data==expression,
기능에 사용되는 요소를 순서대로 반환
2. 사용 예시

ㄴ 리스트나, 매트릭스는 이해하기 쉽습니다.

ㄴ 실수나 순허수의 연산자가 없고 자기 자신이 "실수" "순허수"로 기능에 해당합니다. 따라서 요소arguments=0 이 되는 거구요.
ㄴ 순허수가 아닌 복소수는 실수+순허수와 같이 표현되므로 연산자 "+"가 기능에 해당하고, 실수와 순허수가 요소에 해당하여 arguments=2 가 됩니다.
ㄴ 유리수는... 조금 특별한데, 1/2 은 기능이 "1/2"로서 argument=0 이고, √2/2 는 기능이 "/" 이고 arguments=2 입니다.
ㄴ 수식에 연산자가 있더라도 계산에 의해 즉시 단순화되는 경우(1+2+3 = 6) 단순화된 결과를 기준으로 part() 가 실행됩니다.

ㄴ and 와 or 가 나열되어 있는 경우, or 연산자가 우선순위를 갖습니다.
ㄴ or 연산자가 여러개 있을 경우 왼쪽부터 실행됩니다. (and도 동일)
ㄴ or 연산자는 or 를 기준으로 왼쪽과 오른쪽 두개의 요소로 기능이 구현 됩니다. arguments=2 (and도 동일)

댓글7
- 1
- 2
-
3
FireCraft
part처럼 연산자나 함수를 뽑아주는 명령어가 그 cas에 없다면 그게 cas라고 부를 수 있나? 생각됩니다.
전 split( )함수를 구현하면서 (저도 split이란 이름을 붙였습니다) 코드를
split(v1)=func
if part(v1,0)="or"
return augment({part(v1,1)}, {split(part(v2,2))})
return {v1}
end func
이런 방식으로 짰습니다. (이해하기 쉽게 흐름만 보인 것으로 실제 코드는 아닙니다)
솔직히 아랫글 보고 좀 놀란게 part명령어를 일부러 숨겨놓은 것 같은데 part명령어가 없이 기능들을 짤 수 있을까? 생각해 보았습니다 그러면 식을 string으로 잡아서 거기서 찾아내는 방법을 써야되겠다. 와, 근대 그렇게 짜라고? 이런 생각을 했었는데 제가 생각한 방식 그대로 코드가 되어 있어서였습니다 -
세상의모든계산기
[TI-89, 92 plus guidebook] p.477 에 멀쩡하게 나와 있네요.
제가 nspire part() 로만 검색해서 도통 안나왔었나봅니다.
part() CATALOG
part(expression1[,nonNegativeInteger])
This advanced programming function lets you identify and extract all of the subexpressions in the simplified result of expression1.
For example, if expression1 simplifies to cos(π* x+3):
• The cos() function has one argument: (π* x+3).
• The sum of (π* x+3) has two operands: π* x and 3.
• The number 3 has no arguments or operands.
• The product π* x has two operands: p and x.
• The variable x and the symbolic constant p have no arguments or operands.
If x has a numeric value and you press diamond enter, the numeric value of π* x is calculated, the result is added to 3, and then the cosine is calculated.
cos() is the top-level operator because it is applied last.
part(expression1) ⇒ number
Simplifies expression1 and returns the number of top-level arguments or operands. This returns 0 if expression1 is a number, variable, or symbolic constant such as π, e, i, or ∞.

part(expression1, 0) ⇒ string
Simplifies expression1 and returns a string that contains the top-level function name or operator. This returns string(expression1) if expression1 is a number, variable, or symbolic constant such as π, e, i, or ∞.

part(expression1, n) ⇒ expression
Simplifies expression1 and returns the nth argument or operand, where n is > 0 and ≤ the number of top-level arguments or operands returned by part(expression1). Otherwise, an error is returned.

By combining the variations of part(), you can extract all of the sub-expressions in the simplified result of expression1. As shown in the example to the right, you can store an argument or operand and then use part() to extract further sub-expressions.
Note: When using part(), do not rely on any particular order in sums and products.
Expressions such as (x+y+z) and (x-y-z) are represented internally as (x+y)+z and (x-y)-z. This affects the values returned for the first and second argument. There are technical reasons why part(x+y+z,1) returns y+x instead of x+y.
Similarly, x*y*z is represented internally as (x*y)*z. Again, there are technical reasons why the first argument is returned as y•x instead of x•y.
When you extract sub-expressions from a matrix, remember that matrices are stored as lists of lists, as illustrated in the example to the right.

The example Program Editor function to the right uses getType() and part() to partially implement symbolic differentiation. Studying and completing this function can help teach you how to differentiate manually. You could even include functions that the TI-89 / TI-92 Plus cannot differentiate, such as Bessel functions.

- 1
세상의모든계산기 님의 최근 댓글
쌀집계산기로 연립방정식 계산하기 - 크래머/크레이머/크라메르 공식 적용 https://allcalc.org/56739 3. 'x' 값 구하기 계산기 조작법 목표: x = Dx / D = [(c×e) - (b×f)] / [(a×e) - (b×d)] 계산하기 1단계: 분모 D 계산 (메모리 활용) 1 * 1 M+ : 메모리(M)에 1를 더합니다. (현재 M = 1) -0.1 * -0.2 M- : 메모리(M)에서 0.02를 뺍니다. (현재 M = 0.98 = 0.98) 이로써 메모리(MR)에는 분모 0.98가 저장됩니다. 2단계: 분자 Dx 계산 후 나누기 78000 * 1 : 78000를 계산합니다. = : GT에 더합니다. -0.1 * 200000 : -20000를 계산합니다. ± = : 부호를 뒤집어 GT에 넣습니다. // sign changer 버튼 사용 GT : GT를 불러옵니다. GT는 98000 (분자 Dx) 값입니다. ÷ MR = : 위 결과(98000)를 메모리(MR)에 저장된 분모 D(0.98)로 나누어 최종 x값 100,000를 구합니다. 4. 'y' 값 구하기 계산기 조작법 목표: y = Dy / D = [(a×f) - (c×d)] / [(a×e) - (b×d)] 계산하기 1단계: 분모 D 계산 (메모리 활용) 'x'에서와 분모는 동일하고 메모리(MR)에 0.98가 저장되어 있으므로 패스합니다. 2단계: 분자 Dy 계산 후 나누기 GT ± = : GT를 불러오고 부호를 뒤집어 GT에 더합니다. GT가 0으로 리셋됩니다. 【AC】를 누르면 M은 유지되고 GT만 리셋되는 계산기도 있으니 확인해 보세요. 1 * 200000 : 200000를 계산합니다. = : GT에 더합니다. 78000 * -0.2 : -15600를 계산합니다. ± = : 부호를 뒤집어 GT에 넣습니다. GT : GT를 불러옵니다. 215600 (분자 Dy) 값입니다. ÷ MR = : 위 결과(215600)를 메모리(MR)에 저장된 분모 D(0.98)로 나누어 최종 y값 220,000를 구합니다. x, y 값을 이용해 최종 결과를 구합니다. 2026 01.18 크레이머 = 크레머 = 크라메르 공식 = Cramer's Rule https://allcalc.org/8985 2026 01.18 부호 변경 버튼 https://allcalc.org/52092 2026 01.18 [fx-570 CW] 와의 차이 CW에 【×10x】버튼이 사라진 것은 아닌데, 버튼을 누를 때 [ES][EX] 처럼 특수기호 뭉치가 생성되는 것이 아니고, 【×】【1】【0】【xㅁ】 버튼이 차례로 눌린 효과가 발생됨. ※ 계산 우선순위 차이가 발생할 수 있으므로 주의. 괄호로 해결할 것! 2026 01.18 26년 1월 기준 국가 전문자격 종류 가맹거래사 감정사 감정평가사 검량사 검수사 경매사 경비지도사 경영지도사 공인노무사 공인중개사 관광통역안내사 관세사 국가유산수리기능자(24종목) 국가유산수리기술자 국내여행안내사 기술지도사 농산물품질관리사 물류관리사 박물관 및 미술관 준학예사 변리사 사회복지사 1급 산업보건지도사 산업안전지도사 세무사 소방시설관리사 소방안전교육사 손해평가사 수산물품질관리사 정수시설운영관리사 주택관리사보 청소년상담사 청소년지도사 한국어교육능력검정시험 행정사 호텔경영사 호텔관리사 호텔서비스사 2026 01.17