π
<-

TI-BASIC competition

Re: TI-BASIC competition

Postby grosged » 22 Feb 2016, 15:02

En utilisant un programme de ma conception:

( Téléchargeable ici )

Il est en 2 parties:

Tout d'abord , on (ré)initialise le WatchDogTIMER (voir plus en détails ici: http://wikiti.brandonw.net/index.php?ti ... Ports:6000)

en tapant Asm(prgmWDTRESET

Puis on lance notre programme Basic à mesurer.

Enfin , on lance la lecture du chrono au moyen de Asm(prgmWDTREAD
à ce moment-là s'affiche une valeur, que l'on va diviser par 32768 pour obtenir le résultat final (en secondes)
User avatar
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 32.5%
 
Posts: 776
Images: 92
Joined: 14 Sep 2011, 12:29
Gender: Male
Calculator(s):
MyCalcs profile

Online

Re: TI-BASIC competition

Postby noelnadal » 22 Feb 2016, 15:17

It has been more than one week already. Is there a second task ? ;)
User avatar
noelnadalEcrivain
Niveau 17: GM (Grand Maître des calculatrices)
Niveau 17: GM (Grand Maître des calculatrices)
Level up: 41%
 
Posts: 2271
Images: 0
Joined: 10 Mar 2011, 00:00
Location: France, Melun (77)
Gender: Male
Calculator(s):
MyCalcs profile
Class: INRIA Paris
Twitter: nadalnoel
Facebook: noel.nadal1
GitHub: noelnadal

Re: TI-BASIC competition

Postby PT_ » 22 Feb 2016, 16:03

noelnadal wrote:It has been more than one week already. Is there a second task ? ;)

Tomorrow evening :)
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Online

Re: TI-BASIC competition

Postby noelnadal » 22 Feb 2016, 16:44

Great. ;)
User avatar
noelnadalEcrivain
Niveau 17: GM (Grand Maître des calculatrices)
Niveau 17: GM (Grand Maître des calculatrices)
Level up: 41%
 
Posts: 2271
Images: 0
Joined: 10 Mar 2011, 00:00
Location: France, Melun (77)
Gender: Male
Calculator(s):
MyCalcs profile
Class: INRIA Paris
Twitter: nadalnoel
Facebook: noel.nadal1
GitHub: noelnadal

Re: TI-BASIC competition

Postby Adriweb » 22 Feb 2016, 17:14

Il me semble qu'il est davantage recommandé d'utiliser les GPT que les Watchdog timers, pour de tels usage, mais bon :P

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 82.2%
 
Posts: 14887
Images: 1211
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: TI-BASIC competition

Postby PT_ » 22 Feb 2016, 17:30

Adriweb wrote:Il me semble qu'il est davantage recommandé d'utiliser les GPT que les Watchdog timers, pour de tels usage, mais bon :P

I've created a very accurate stopwatch, not based on the WatchDog Timer :)
You can download it here:
https://www.cemetech.net/programs/index ... /TIMER.zip
Read the README for more details :D
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: TI-BASIC competition

Postby grosged » 22 Feb 2016, 18:16

Bah, je suis fidèle à mon Chien "WatchDog", c'est tout !.. :p
Moi je dis qu'on peut "compter" sur lui :p
User avatar
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 32.5%
 
Posts: 776
Images: 92
Joined: 14 Sep 2011, 12:29
Gender: Male
Calculator(s):
MyCalcs profile

Re: TI-BASIC competition

Postby Adriweb » 22 Feb 2016, 19:11

grosged wrote:Bah, je suis fidèle à mon Chien "WatchDog", c'est tout !.. :p
Moi je dis qu'on peut "compter" sur lui :p

Image

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 82.2%
 
Posts: 14887
Images: 1211
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: TI-BASIC competition

Postby PT_ » 23 Feb 2016, 15:21

And... it's time for da second task!
I hope you all liked the first one, and if not, sorry for that ;)

We all love TI-BASIC, right? That's why we're participating. In TI-BASIC, it's sometimes necessary to store an expression in a string, for example when reading from an appvar. To get the actual value of that, we do have the command expr(. But what can expr( do? Well, it's mostly for math. There are more functions you can't do with that, than you can. But don't be frustated, math is as funny as well. There are many, many math commands (look in the Catalogus if you don't trust me), but some of them we don't need. But do you also believe that it parses not only math? You can even have a list or matrix stored in the string.
And that is what this new task is about. You have to write an algorithm that parses a string, like expr( does. Of course, there are some limits.
1) We don't need all the math commands, only this commands are in the string: *-/+^().0123456789sqrt(
2) You're not allowed to store the string elsewhere, and get the value by calling that function. Such as String>Equ( : Y1(1 is not allowed. Like that, |u, |v, |w and even storing it to a list is not allowed. Maybe there are more ways to get it directly - not allowed. You have to parse the string yourself.
3) You're not allowed to have expr( in your whole program (duh :P)

To summarize this all:

Task 2

Create an algorithm that parses a string with the following characters in it: *-/+^().0123456789sqrt(. The input is in both Ans and Str1. You may assume the length of the string is not more than 99, and more than 10. Again, the time is measured over 10 times parsing a string. An example would look like this:
Code: Select all
1.59*(5^3-9.5)/(5/3)^sqrt(4-2

In this case, the output should be 89.173866... The order of operations are important. The output value should be in A, as many decimals as a TIOS variable can store. As you can see, the input doesn't need to close parenthesis.
The scoring is the same as task 1, so you know speed is more important as size..

I wish you all good luck, and if you don't like this one, remember this is only #2, and there are more coming task which are that hard....
If you have any questions, please ask! :)
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: TI-BASIC competition

Postby Bisam » 23 Feb 2016, 16:09

Does the parser need to throw an error if the string does not contain a valid sentence or the string should be assumed valid ?
E.g., can a string contain 3(+5 ?
This considerably changes the time...
User avatar
BisamAdmin
Niveau 15: CC (Chevalier des Calculatrices)
Niveau 15: CC (Chevalier des Calculatrices)
Level up: 69.6%
 
Posts: 5670
Joined: 11 Mar 2008, 00:00
Location: Lyon
Gender: Male
Calculator(s):
MyCalcs profile

PreviousNext

Return to TI-Basic

Who is online

Users browsing this forum: No registered users and 8 guests

-
Search
-
Social TI-Planet
-
Featured topics
Ndless for CX 4.5.5 / CX II 6.2.0
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
12345
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
3028 utilisateurs:
>3009 invités
>9 membres
>10 robots
Record simultané (sur 6 mois):
32248 utilisateurs (le 01/09/2025)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)