- 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
세상의모든계산기 님의 최근 댓글
2번 사진 3개 사진 공통적으로 구석(corner) 에 증상이 있다는 특징이 있네요. 영상 찾아보니 이 가능성이 가장 높은 듯 합니다. https://www.youtube.com/watch?v=zxRBohepzwc ㄴ Liquid Crystal Leakage (액정 누설). ㄴ 손으로 밀어내니 주변으로 밀려나네요. 그래서 점으로 보이기도 하구요. 2025 10.29 500! 의 십진수 근사값 확인 500! = 1.22013682599111006870123878542304692625357434280319284219241358838 × 10^(1134) (참값, 울프람 알파) 2025 10.29 관련 라이브러리 https://allcalc.org/56263 sgn(x) 내장된 부호 함수(signum function)와 달리, 이 함수의 sgn(0)은 0을 반환합니다. 2025 10.29 라이브러리로 사용할 수 있습니다. (제작자 추천) 1. mylib 폴더에 넣기 2. Actions ➡️ library ➡️ refresh libraries 실행 하기 2025 10.29 ChatGPT-5 기호(÷, /, :) 자체는 의미적으로 같은 “나눗셈”을 뜻하지만, 문맥(사람이 쓰는 수학 vs 컴퓨터/프로그래밍)에 따라 해석 우선순위가 달라질 수 있습니다. 🔹 1️⃣ 전통 수학 표기 — ÷, /, : 수학 교과서, 논문, 일반 문서 등에서는 셋 다 의미적으로 “나누기”로 간주됩니다. 즉, 48÷2(9+3), 48/2(9+3), 48:2(9+3) 은 같은 의미로 받아들여야 합니다. 모두 사람의 수학 관행적 해석이 적용되어 48 ÷ 2 × (9+3) = 288 로 처리되죠. 즉, 기호가 바뀌어도 결과는 바뀌지 않습니다. 🔹 2️⃣ 컴퓨터·프로그래밍 문맥에서 / 사용 시 컴퓨터는 “생략된 곱셈(implicit multiplication)”을 따로 구분하지 못합니다. 따라서 다음 두 식은 완전히 다르게 인식됩니다. 표현 파이썬 등에서 해석 결과 48 / 2*(9+3) ((48 / 2) * (9+3)) 288 48 / 2(9+3) ❌ 문법 오류 (생략된 곱셈 인식 불가) — 즉, 컴퓨터 언어에서는 생략된 곱셈이 허용되지 않기 때문에, /는 반드시 명시적 *와 함께 써야 합니다. 🔹 3️⃣ “:” 기호의 경우 현대 수학에서는 “비율”을 나타내는 기호로 쓰입니다. a:b = \frac{a}{b} 따라서 (27 : 3(1+2)3) 같은 표현은 모호하거나 비표준적으로 간주됩니다. 대부분의 경우 계산기로는 입력 자체가 불가능합니다. ✅ 정리 기호 의미 결과 변화 주로 쓰이는 문맥 ÷ 나누기 없음 초중등 수학, 일반 표기 / 나누기 없음 (단, 프로그래밍에서는 생략 곱 불허) 수학/컴퓨터 : 비율 (또는 나누기 의미로 혼용) 보통 계산식에서는 사용 안 함 비, 비율 표기 🔹 결론 48 ÷ 2(9+3), 48/2(9+3), 48:2(9+3) 는 “수학적 의미”로는 동일하게 81로 해석됩니다. 하지만 프로그래밍이나 수식 파서(context) 에서는 /만 유효하고, 생략된 곱은 허용되지 않으며, :는 아예 다른 의미(비율)로 인식됩니다. 2025 10.28