Author Topic: Division by zero  (Read 3440 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Division by zero
« on: September 09, 2013, 02:50:10 PM »
This should happen within a few minutes after you load it.
The internet is corrupt and controlled by criminally minded people.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Division by zero
« Reply #1 on: September 09, 2013, 03:18:11 PM »
Oh bugger. :L

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Division by zero
« Reply #2 on: September 09, 2013, 04:00:13 PM »
I can't recreate it!

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Division by zero
« Reply #3 on: September 09, 2013, 04:43:07 PM »
There is a painful div/0 bug I introduced by adding new dna commands, I was trying to track it down, but had little luck. I'll have another go at it next weekend.
It is really bothering me because I put integrity checks on all new commands I added.

Code: [Select]
addstore
substore
multstore
divstore
ceilstore
floorstore

rndstore
sgnstore
absstore
sqrstore
negstore

anglecmp

unpow
depow
sin (multiplied by 32000)
cos

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Division by zero
« Reply #4 on: September 10, 2013, 05:35:32 AM »
Yeah, I was looking through those as well, I couldn't really find what the problem was

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Re: Division by zero
« Reply #5 on: September 10, 2013, 08:14:58 AM »
At least it doesn't seem to happen often. This happened on my laptop with Win XP when I was running two instances with randombots. It hasn't happened yet on my desktop with Win 7 where I'm running two instances with designed bots.
The internet is corrupt and controlled by criminally minded people.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Division by zero
« Reply #6 on: September 15, 2013, 05:39:55 PM »
Found it, was caused by attempting to divide by log(1)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Division by zero
« Reply #7 on: September 21, 2013, 11:40:25 AM »
enabled some low level checks in an attempt to stabolize the program and awoid or atleast track run-time errors better (It was surprizing how little they impacted performance)
Created more meaningfull names for unpow (now called root) and depow (now called logx)
Fixed error in logx (this was causing a div/0)
mutation ox now between 20x and 1/20 x