Re:Why did Turbo Pascal apps fail with a division-by-zero on...
by Someone on Sunday August 25, 2019 @05:16PM
(#20795647)
Reading https://retrocomputing.stackexchange.com/a/12112, they moved the limit from ≈20MHz (num iterations overflowed 16 bits, leading to incorrect computation of the number of loops to run per second) to ≈200Mhz (num iterations divided by 55 overflowed 16 bits, leading to this “divide by zero” message)
(Aside: all things staying the same, that should have increased the limit by a factor of 55. It seems the processor got more efficient running these idle loops by a factor of about five (about 2½ if there’s a sign bit in the result of the division)
So yes, you could call this a different bug. I don’t think having that bug in the code is inexcusable, though.
⇒ I don’t think they could have found this in testing. So, is it inexcusable that this went through code review? I don’t think so. Not only would one have to realize that that new limit now came into play, one also would have realized the higher efficiency of the 200MHz processor(s) would bring the number down further.
(Aside: all things staying the same, that should have increased the limit by a factor of 55. It seems the processor got more efficient running these idle loops by a factor of about five (about 2½ if there’s a sign bit in the result of the division)
So yes, you could call this a different bug. I don’t think having that bug in the code is inexcusable, though.
TP7 is from March 1993 (http://progopedia.com/version/turbo-pascal-7.0), and it seems the first 200Mhz PC CPU was from November 1995 (https://en.wikipedia.org/wiki/Timeline_of_computing_1990–199...)
⇒ I don’t think they could have found this in testing. So, is it inexcusable that this went through code review? I don’t think so. Not only would one have to realize that that new limit now came into play, one also would have realized the higher efficiency of the 200MHz processor(s) would bring the number down further.