Author Topic: Desimals and new commands  (Read 3117 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Desimals and new commands
« on: October 11, 2007, 02:02:46 PM »
Some new commands:

nl 'natural log nl(10^3) / nl(10) = 3
sin ' sin(A) * 1000
cos 'cos(A) * 1000
sin(a) / cos(a) = tan(a) , there is no need for tan.

constants:
e 'nl(e/1000) = 1 e = 2718
pi = 3142

Instead of adding desimals we can do an internal  A B root that does A ^ (1/B) but I have no idea how to write that in c# thats why I need examples

The following commands worked well in my TI-83 Project called Project duel:
A is the top of stack
B is the second from top
C is the third from top
D is the fourth from top

move 'moves a set of numbers to the lower stack. A is the ammount of stack elements , B is the position to which it is moved.
mtt 'moves a set of numbers from lower stack to top. A is the ammount of stack elements, B is the position from which it is moved.
mdup 'duplicates a set of numbers on the stack. A is the ammount of stack elements, B is the number of copys

and finaly the big one called "ang"

A = x1
B = x2
C = y1
D = y2

after taking four ang retuns two elements in stack
A = angle from point(x1,y1) to point (x2,y2)
B = Distance from point(x1,y1) to point (x2,y2)


P.S.
Numsgil I found a compromize. I will post it within the next 2 weeks.
« Last Edit: November 29, 2007, 02:12:49 PM by Botsareus »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Desimals and new commands
« Reply #1 on: November 29, 2007, 02:12:13 PM »
There is also cndmove , cndmtt , and cndmdup. The cndmtt , cndmove and cndmdup is executed independent from the condition in the gene. (It's like they have a private "conditionless" attached to them)

I propose that the condition stack and the int. stack have a limit at 200.

Therefore if you want to popint for example: you write: 201 1 move

I also propose that the int. stack loops from the end to the biggining of the dna example:

Quote
.up
50

at first it will do 0 .up after words it will do 50 .up

finaly I want to add two more commands:

tpo 'to the power of. which maxes out on 9999
tro 'to the root of, with zeros and negative values it gets tricky but I will figure this out.
« Last Edit: January 24, 2008, 02:08:44 PM by Botsareus »

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Desimals and new commands
« Reply #2 on: November 29, 2007, 03:52:30 PM »
Quote
nl 'natural log nl(10^3) / nl(10) = 3
I'd say ln, and my calculator says ln(10) = 2,3
Edit: No, you're right  I misread. I is an more complicated way to just say 10log1000.

nl(10^3) / nl(10) = 3 is true.

ln=natural log

I see nl=Nederland=The Netherlands  

You want to make in darwinbots some geometry. Well, okay. Why, but okay.
« Last Edit: November 29, 2007, 03:57:11 PM by Peter »
Oh my god, who the hell cares.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Desimals and new commands
« Reply #3 on: January 24, 2008, 02:11:25 PM »
The above has been updated
Quote
There is also cndmove , cndmtt , and cndmdup. The cndmtt , cndmove and cndmdup is executed independent from the condition in the gene. (It's like they have a private "conditionless" attached to them)