Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
JWinslow23 wrote:
mr womp womp wrote:
ln(√( )
i/Ans/(e^(-πiA

τ. Razz

I even took a look at the Lanczos approximation, the actual place that first guy got the gamma function formula, and guess what it consists of?


where


One more image from the Mathworld page on it:


All 2πs. No πs.


Oh god...
KermMartian wrote:
Post 'em up here, like this:

[Bunch of routines...]

Thank you, I didn't realize most of these, and i feel stupid, but I not use these every time!

+1 satisfied customer.

Edit by PT_, please don't have HUUGGEE quotes Smile
JWinslow23 wrote:


I made my own version a long time ago.


Code:
ClrHome
"?
Disp "NUMBER:","",Ans,Ans,Ans,Ans
Output(8,1,"RED: 0  WHITE: 0
DelVar TDelVar GDelVar Rint(10rand(4→L1
4→dim(L2
Repeat T=14 or K=45 or R=4
Repeat Ans
getKey
End
Ans(102≠Ans)-13int(Ans/13(2>abs(5-abs(5-abs(Ans-83→K
If Ans=105 and G=4
Then
For(X,1,4
Output(2+X,3+T,L2(X
End
DelVar GT+1→T
sum(L1=L2→R
Output(8,6,Ans
Output(8,16,‾Ans+sum(seq(min(sum(L1=X),sum(L2=X)),X,0,9
Output(1,9,"    //4 spaces
Else
If Ans≤9 and G≠4
Then
G+1→G
K→L2(Ans
End
If Ans=24 and G
Then
G-1→G
Output(1,Ans+9," //1 space
End
End
For(X,0,G
If X
Output(1,8+X,L2(X
End
End
For(X,1,4
Output(2+X,1,L1(X
End
If K≠45
Then
Output(1,1,"YOU "+sub("WIN!   LOSE...",8-7(R=4),7
Pause
End
DelVar GDelVar KDelVar RDelVar TDelVar XDelVar L1DelVar L2ClrHome



Mine's shorter. *mike drop*
min(, without zeroes
Returns the smallest number in a list, besides zeroes.

Code:
min(Ans+not(Ans)max(Ans
Flip a string/ reverse it
Takes a string, Str1, reverses it and returns the output in Str2
There may be others like this, but this isn't very optimized because I came up with this on my own.


Code:
Input Str1
" "->Str2
For(A,length(Str1),1,~­1
Str2+sub(Str1,A,1->Str2
End
sub(Str2,2,length(Str2)-1->Str2
Pause Str2
That is a very cool trick. Can you do that to a PHYSICAL TI-84 Plus?
Graphing Calculator TI-84+
tnn wrote:
That is a very cool trick. Can you do that to a PHYSICAL TI-84 Plus?
Graphing Calculator TI-84+

You can pick up a real ti-84 calculator and type it into the program editor if that's what you mean...
For the flip a string thing?? Basically, if you input "ABC TI-SUX", it would output "XUS-IT CBA"
Find and Replace Text in String
Replaces all occurrences of a specific search text in a string with desired replacement text.
This has no doubt been attempted before, but here is my take on it.

Inputs:
Str1- main string
Str2- search string
Str3- replacement string


Outputs:
Str1- the string that gets modified


Code:
length(Str2->J
While inString(Str1,Str2
   inString(Str1,Str2->I
   Str3
   If I>1
   sub(Str1,1,I-1)+Ans
   If I+J<1+length(Str1
   Ans+sub(Str1,I+J,1+length(Str1)-(I+J
   Ans->Str1
End
I made some further optimizations (also, "length" is spelled wrong Smile)


Code:
length(Str2->J
1->I
While I
   inString(Str1,Str2->I
   Str3
   If I>1
   sub(Str1,1,I-1)+Ans
   If I+J<1+length(Str1
   Ans+sub(Str1,I+J,1-J-I+length(Str1
   Ans->Str1
End
_iPhoenix_ wrote:
I made some further optimizations (also, "length" is spelled wrong Smile)


Code:
length(Str2->J
1->I
While I
   inString(Str1,Str2->I
   Str3
   If I>1
   sub(Str1,1,I-1)+Ans
   If I+J<1+length(Str1
   Ans+sub(Str1,I+J,1-J-I+length(Str1
   Ans->Str1
End

Length was never spelled wrong.

Also, that code won’t even work since variable I has a chance of being 0 within the loop, which would cause problems. The loop is not even supposed to run at all unless an occurrence of the search string was found.
Michael2_3B wrote:
Find and Replace Text in String
Replaces all occurrences of a specific search text in a string with desired replacement text.
This has no doubt been attempted before, but here is my take on it.

Inputs:
Str1- main string
Str2- search string
Str3- replacement string


Outputs:
Str1- the string that gets modified


Code:
length(Str2->J
While inString(Str1,Str2
   inString(Str1,Str2->I
   Str3
   If I>1
   sub(Str1,1,I-1)+Ans
   If I+J<1+length(Str1
   Ans+sub(Str1,I+J,1+length(Str1)-(I+J
   Ans->Str1
End


Here's my attempt at an optimized version. Only saves 5 bytes, but I think behavior is preserved:

Code:
length(Str2→J
While inString(Str1,Str2
   inString(Str1,Str2→I
   Str3
   If ln(I
   sub(Str1,1,I-1)+Ans
   If I+J≤length(Str1
   Ans+sub(Str1,I+J,1-I-J+length(Str1
   Ans→Str1
End
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 13 of 13
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement