Exact
float6
Disp "Enter rational function in the form of a/b(x)"
Prompt a,b,x
If x="x" or x="s" or x="t" Then
q:=a/b // 몫 계산
r:=a-q*b // 나머지 계산
If q=0 Then
Disp "The original polynomial is:"
Disp r
Else
Disp "The quotient is:"
Disp q
Disp "The remainder is:"
Disp r
EndIf
roots:=poly_roots(b,x)
coeffs:=List(0,dim(roots))
For i,root In roots Do
If Im(root)=0 Then // 근이 실수인 경우
coeff:=limit(a/b/(x-root),x,root)
Else // 근이 복소수인 경우
Disp "Select PFD level for complex roots of", root
Menu "PFD Level", ["Real", "Complex"]
If Ans=1 Then // PFD level: Real
coeff:=limit(a/b/(x-root),x,root)
Else // PFD level: Complex
coeff_real:=limit(a/b/(x-Re(root)),x,Re(root))
coeff_imag:=limit(a/b/(x-Im(root)),x,Im(root))
coeff:=Matrix([[coeff_real,coeff_imag],[-coeff_imag,coeff_real]])
EndIf
EndIf
coeffs[i]:=coeff
EndFor
If dim(roots)=0 Then
Disp "No roots found."
Else
Disp "Coefficients:"
Disp coeffs
EndIf
Else
Disp "Error: Invalid variable used"
Stop
EndIf
설명만 입력하고 ti nspire 용으로 만들어 달랬더니 위와 같이 만들어줬습니다.
대충 ti basic 하고 비슷은 한데, 못쓰는 명령어도 짬뽕되어 있고 그렇네요.
설명만 입력하고 ti nspire 용으로 만들어 달랬더니 위와 같이 만들어줬습니다.
대충 ti basic 하고 비슷은 한데, 못쓰는 명령어도 짬뽕되어 있고 그렇네요.