I am writing a function for my TI-89 Titanium. I see that there is a built-in factor() function under Algebra(F2). I know that in my use case it is going to be the sum of two integers; for example my function might call factor(899) in part of it and expect 29*31. How can I assign these values to two variables? I am going to need to use them later in my program. For example I might want to have q set to 29 and r set to 31.
2026-03-26 04:49:28.1774500568
TI-89 factor() return value to two variables
730 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There's probably a better way, but I've got around this problem using the string() function.
string(factor(899))="29*31"
Then you can extract the numbers into a list from there.
EDIT:To extract just two variables, like in your example isn't too difficult.
If you are in a program, you could first store string(factor(899)) to a variable. Say string(factor(899))STO>"stringf"
Then: expr(left(stringf,inString(stringf,"*")-1)) will return 29. inString() finds the "*" in your string, left() takes the left part of your sting until right before the "*" and expr() converts the string to a number.
Similarly to get the right side of the "*" you could go with expr(right(stringf,length(stringf)-inString(stringf,"*")))