This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic Brain Teasers => TI-BASIC
Author Message
Recursive Acronym


Advanced Member


Joined: 11 Dec 2006
Posts: 499

Posted: 14 Oct 2007 10:44:42 am    Post subject:

It looks like we are in need of another teaser. This one is for TI-83 basic.
Create a program that asks for X, then displays:
(sin(x)+cos(x))^5
My size is 22+name.


Last edited by Guest on 14 Oct 2007 01:11:51 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 14 Oct 2007 10:51:48 am    Post subject:

19 bytes, 18 with an algorithm that only works for X≠2.

Last edited by Guest on 14 Oct 2007 10:55:19 am; edited 1 time in total
Back to top
CyJackX


Newbie


Joined: 26 Aug 2007
Posts: 30

Posted: 14 Oct 2007 11:19:28 am    Post subject:

:-/
I can only get 20, counting the name.
Back to top
Recursive Acronym


Advanced Member


Joined: 11 Dec 2006
Posts: 499

Posted: 14 Oct 2007 01:14:50 pm    Post subject:

Once again, I screwed up. I changed the first post to the new challenge. By the way, what way your solution to the original challenge, Darkerline? I could only get 20.
Back to top
JoostinOnline


Active Member


Joined: 22 Aug 2007
Posts: 559

Posted: 14 Oct 2007 01:23:50 pm    Post subject:

I can only get 22+name as well.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 14 Oct 2007 03:11:35 pm    Post subject:

Recursive Acronym wrote:
Once again, I screwed up. I changed the first post to the new challenge. By the way, what way your solution to the original challenge, Darkerline? I could only get 20.
[post="114423"]<{POST_SNAPBACK}>[/post]
My better solution was Prompt X:e^(5ln(X-2.

But, no fair changing the calculation :-(

Anyway, the same idea applied here gives me a 21+name-byte program (that doesn't work when sin(x)=cos(x))


Last edited by Guest on 10 Sep 2010 04:54:52 am; edited 1 time in total
Back to top
CyJackX


Newbie


Joined: 26 Aug 2007
Posts: 30

Posted: 14 Oct 2007 03:28:58 pm    Post subject:

DarkerLine wrote:
My better solution was Prompt X:e^(5ln(X-2.
[post="114427"]<{POST_SNAPBACK}>[/post]


Isn't that undefined for X<2? I don't think that concept works.

The best I've gotten for the new problem is 22 with the name.


Last edited by Guest on 10 Sep 2010 04:55:55 am; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 14 Oct 2007 03:41:23 pm    Post subject:

When X<2, ln(X-2) is a complex number, but if you're not in Real number mode then the calculation still works out at the end (not only to something real, but also to the correct answer).

It's when X=2 that the real problem occurs - ln(0) is even more undefined. If you forget rigor for a moment and say that ln(0)=-∞ then the calculation works out because 5∞=∞, and e-∞=0. The calculator can't do this which is why this method doesn't work when the result should be 0.

It would be really cool if you could get an optimization based on the identity sin(x)+cos(x)=sin(x+π/4)√2. Unfortunately, I see no way to do this.


Last edited by Guest on 19 Jan 2008 11:58:57 am; edited 1 time in total
Back to top
Recursive Acronym


Advanced Member


Joined: 11 Dec 2006
Posts: 499

Posted: 14 Oct 2007 04:01:10 pm    Post subject:

This was my solution:
Solution wrote:
Prompt X:.2[xth root](sin(X)+cos(X
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 14 Oct 2007 04:01:52 pm    Post subject:

DarkerLine wrote:
It would be really cool if you could get an optimization based on the identity sin(x)+cos(x)=sin(x+π/4)√2. Unfortunately, I see no way to do this.
That was actually my garden path for the past half hour. I'm sure you also found .2× ?

[EDIT] – Crosspost. Razz


Last edited by Guest on 10 Sep 2010 04:54:22 am; edited 1 time in total
Back to top
adriweb


Newbie


Joined: 28 Aug 2007
Posts: 22

Posted: 16 Oct 2007 06:00:16 am    Post subject:

Arf, I had 22 bytes ...

GG Weregoose ! Wink
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 16 Oct 2007 07:07:49 am    Post subject:

adriweb wrote:
GG Weregoose !  Wink
Me? Why? What did I do?

Nice site, by the way. If you want to advertise it, you can start a new topic at Community News.


Last edited by Guest on 16 Oct 2007 07:10:05 am; edited 1 time in total
Back to top
JoostinOnline


Active Member


Joined: 22 Aug 2007
Posts: 559

Posted: 16 Oct 2007 04:50:05 pm    Post subject:

Weregoose wrote:
adriweb wrote:
GG Weregoose !  Wink
Me? Why? What did I do?
Who cares, just go along with it! Very Happy
Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement