Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Runer112

Pages: 1 ... 100 101 [102] 103 104 ... 153
1516
Math and Science / Re: Math Community Quiz
« on: January 12, 2011, 10:53:28 pm »
Code: [Select]
[2  1]
[1  3]

? Not sure if 1 counts as prime...

EDIT: Nevermind, 1 isn't prime. ;) Anyways I remembered I need to be quiet for this question, I'm not allowed to answer.

1517
Math and Science / Re: Math Community Quiz
« on: January 12, 2011, 10:37:53 pm »
I didn't specify that the factors had to be prime (didn't intend to specify it either, but I understand the confusion) so nemo got it.

1518
Math and Science / Re: Math Community Quiz
« on: January 12, 2011, 10:34:41 pm »
Well it turns out the answer had 6 factors anyways :P

1519
Math and Science / Re: Math Community Quiz
« on: January 12, 2011, 10:28:44 pm »
What? I counted 1, 3, 7, 9, 21, and 63.

1520
Math and Science / Re: Math Community Quiz
« on: January 12, 2011, 10:25:29 pm »
Yeah, 63 is it. I probably should've thought a bit more before picking a question with, once you see it, such an obvious answer. :P

1521
Math and Science / Re: Math Community Quiz
« on: January 12, 2011, 10:20:11 pm »
Runner did you mean have the ones in its binary form when added together equal the number of factors?

Yes. By the way, is it ok that I changed the question slightly to reduce the minimum number of factors? Because now that I looked at it 6 is actually too easy :P

1522
Math and Science / Re: Math Community Quiz
« on: January 12, 2011, 10:14:36 pm »
I haven't actually figured this out yet myself, but it sounds like an interesting challenge, so:

Find the smallest positive integer that has at least 5 factors (including 1 and itself) for which the number of 1s in its base 2 representation equals the number of factors.

I hope this doesn't end up being too ridiculous to figure out. :o


EDIT: Reduced the minimum number of factors to 5.

1523
Math and Science / Re: Math Community Quiz
« on: January 12, 2011, 10:03:21 pm »
I got 2.

1524
The Axe Parser Project / Re: Features Wishlist
« on: January 12, 2011, 09:09:02 pm »
calcdude84se reminded me in IRC of _InsertMem and _DelMem. We both seemed to agree that they're quite useful bcalls and would be quite useful. Any chance of them being officially added? If not I might just end up writing an Axiom for it, although I get the feeling that an Axiom wouldn't be nearly as widely useful as a built-in feature. And I realize that they could be dangerous, but there are so many other ways to RAM clear in Axe already. :P

1525
Math and Science / Re: Math Community Quiz
« on: January 12, 2011, 08:45:12 pm »
ln(x) I think... My calculus skills are a little fuzzy

1526
TI-BASIC / Re: BASIC One-Liners
« on: January 10, 2011, 10:26:17 pm »
Code: [Select]
:prgmXXR

1527
Hmm it seems that lots of people are having trouble with this file... Let me try thepenguin77's suggestion. The first few characters in the file are now Unicode characters. Does this file render correctly?

EDIT: Nope, definitely doesn't, I just tried it myself. I'll keep looking into this.

EDIT 2: Yay, looks like I got UTF-8 to work! I'll reattach the file to the first post immediately.

1528
Quote
Pause 1000 is not a second, a second is closer to Pause 1800
Can you develop ? Is there same speed in 84+ and 83+ ?
Pause 1800 s'arrête pendant environ une seconde à 6 MHz, et Pause 4500 s'arrête pendant environ une seconde à 15 MHz.

Quote
DS<() decreases the variable before checking if it equals 0
Well, this code will display 0 :
Code: [Select]
:1=>A
:DS<(A,4)
:End
:Disp A>Dec
???
Ce code affichera 4, pas 0. :P

Quote
In your For() loop made with a Repeat loop, "Repeat Variable=ValeurDeFinDeBoucle" should be "Repeat Variable>ValeurDeFinDeBoucle"
I didn't know, for( loop tests if the expression is greater than the value tested?
Ouais, les boucles For() testent si la valeur de la variable de boucle est supérieure à la valeur maximale de boucle. Vous pouvez souligner que une boucle For() avec une valeur maximale de 65535 ne finira jamais.

Quote
The code for the last question about loops would only freeze the calculator if A=0.
I didn't find where you refer ?  ???
Code: [Select]
:Repeat A
:While A
:.Code
:End
:End
Ce code ne gèlera pas la calculatrice si A≠0, parce que la boucle Repeat quittera dès le premier test.

1529
Oh yeah, it's a Unicode text file because it uses some special characters like → and ►. I thought stuff like that was saved in a file header or something, but I guess not. Is there a certain way to open a text file in Unicode format that I should tell people about?

1530
Axe / Documentation of the Speed and Size of (Almost) Every Axe Command
« on: January 10, 2011, 01:09:23 pm »
TL;DR : An Axe command list with size, speed, and notes for Axe commands. Good for optimizing.



I'd say I'm fairly decent at optimizing Axe programs. This stems partially from my good amount of experience with Axe. After having used Axe for a long time, I know all of the commands and options available, so when trying to make code to do something, I can usually think of many different ways to do it. Knowing offhand the sizes of a decent number of commands helps me eliminate a large number of these options, and between what's left, I often just try each option one by one, compiling the program with each option and seeing which is the smallest.

What helps even more to optimize my code is my experience with z80 assembly. When thinking about the smallest or fastest way to do something, I could think of the assembly code that Axe commands break down into and actually count bytes and cycles for a very exact comparison.

The Auto Opts.txt file included in Axe releases helped me learn a lot, but it only lists the sizes of what its name would suggest, the automatic optimizations. And although those often help to produce the smallest sizes, what about speed? And what about commands that aren't listed there? I often had to resort to methods like I talked about above, such as brute force testing all the options or trying to step through the assembly in my head. But those can be difficult and time consuming, even for someone with a lot of experience.

So I decided to make a list, detailing some specifications about every Axe command. This means basic loading and saving, auto optimizations, math routines, graphic routines, everything. For every command, I listed the command's size and equivalent Axe code. With this file, you could determine the exact size of anything you can do in Axe. It also lists the exact or approximate time that most commands take, so you can optimize for speed as well, something which is much harder to determine than size without examining the underlying machine code for every command. But I did just this, so others who are able to don't have to spend the lengthy amount of time doing so, and so others who aren't able to don't have to be able to.

I am missing the speed of some commands, as the remaining ones are some of the more challenging ones to test. I hope to test all of these eventually, but for now I'll release what I have. But for the commands that do have speed documented, you can learn some interesting things. Like how Pt-Off() is faster than Pt-On() and Pt-Change() for drawing aligned sprites (x and y are multiples of 8), but slower for unaligned sprites. Or how, on my calculator's hardware at least, DispGraphr is actually faster than DispGraph.


Anyways, without further ado, I'll attach the file. I highly suggest viewing it in a text editor like Notepad. Without a monospaced font and an 8-character tab width, it won't look pretty. I'll try to keep it up to date and modify it as new versions of Axe come out so you can always have a copy you can know is accurate for the current version.


Tip: To search for a specific command, try using your text file viewer's find feature to search for the Axe source code equivalent.





If you see any errors or have any questions or suggestions, just post them here.

Current version: 0.5.3b


Pages: 1 ... 100 101 [102] 103 104 ... 153