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)
TI-BASIC competition
30 posts
• Page 2 of 3 • 1, 2, 3
-
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)- Posts: 776
- Images: 92
- Joined: 14 Sep 2011, 12:29
- Gender:
- Calculator(s):→ MyCalcs profile

Re: TI-BASIC competition
It has been more than one week already. Is there a second task ? 

-
noelnadalEcrivain
Niveau 17: GM (Grand Maître des calculatrices)- Posts: 2271
- Images: 0
- Joined: 10 Mar 2011, 00:00
- Location: France, Melun (77)
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: INRIA Paris
- Twitter: nadalnoel
- Facebook: noel.nadal1
- GitHub: noelnadal
Re: TI-BASIC competition
noelnadal wrote:It has been more than one week already. Is there a second task ?
Tomorrow evening

Age of CEmpires I - In progress!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Posts: 259
- Joined: 09 Feb 2016, 23:06
- Gender:
- Calculator(s):→ MyCalcs profile

-
noelnadalEcrivain
Niveau 17: GM (Grand Maître des calculatrices)- Posts: 2271
- Images: 0
- Joined: 10 Mar 2011, 00:00
- Location: France, Melun (77)
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: INRIA Paris
- Twitter: nadalnoel
- Facebook: noel.nadal1
- GitHub: noelnadal
Re: TI-BASIC competition
Il me semble qu'il est davantage recommandé d'utiliser les GPT que les Watchdog timers, pour de tels usage, mais bon 

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
-
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)- Posts: 14887
- Images: 1211
- Joined: 01 Jun 2007, 00:00
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- Twitter: adriweb
- GitHub: adriweb
Re: TI-BASIC competition
Adriweb wrote:Il me semble qu'il est davantage recommandé d'utiliser les GPT que les Watchdog timers, pour de tels usage, mais bon
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

Age of CEmpires I - In progress!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Posts: 259
- Joined: 09 Feb 2016, 23:06
- Gender:
- Calculator(s):→ MyCalcs profile
Re: TI-BASIC competition
Bah, je suis fidèle à mon Chien "WatchDog", c'est tout !.. 
Moi je dis qu'on peut "compter" sur lui

Moi je dis qu'on peut "compter" sur lui

-
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)- Posts: 776
- Images: 92
- Joined: 14 Sep 2011, 12:29
- Gender:
- Calculator(s):→ MyCalcs profile
Re: TI-BASIC competition
grosged wrote:Bah, je suis fidèle à mon Chien "WatchDog", c'est tout !..
Moi je dis qu'on peut "compter" sur lui

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
-
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)- Posts: 14887
- Images: 1211
- Joined: 01 Jun 2007, 00:00
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- Twitter: adriweb
- GitHub: adriweb
Re: TI-BASIC competition
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
)
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:
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!
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

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!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Posts: 259
- Joined: 09 Feb 2016, 23:06
- Gender:
- Calculator(s):→ MyCalcs profile
Re: TI-BASIC competition
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
This considerably changes the time...
E.g., can a string contain
3(+5
?This considerably changes the time...
-
BisamAdmin
Niveau 15: CC (Chevalier des Calculatrices)- Posts: 5670
- Joined: 11 Mar 2008, 00:00
- Location: Lyon
- Gender:
- Calculator(s):→ MyCalcs profile
30 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 6 guests