On 2015-12-02 01:57, Paul Koning wrote:
On Dec 1, 2015, at 6:29 PM, Johnny Billquist <bqt%softjar.se@localhost> wrote: After some hiatus, "my" VAX 8650 is back among the living, so I decided to try and build current again. ... Now the "analysis". It appears that programs call log10() with an argument of 0, and consider this to be normal. Unfortunately, this is one of those places where the VAX not doing IEEE FP bites us. The IEEE log10() of 0 will return -inf, and happily chug on. The VAX log10() of 0 will cause an illegal instruction trap. I suspect the other programs crashing might be because of the same reason. The question is - what should we do? I'm tempted to just change the code for log() to return 0, or possible -MAX_whatever and not trap. Opinions?Why not simply fix the bug? log(0) is invalid. It's probably an initialization error, where log() is used for some magic timekeeping math that is only valid the second time around.
Yes, except I suspect that people are happy just to write the code that way, as IEEE FP actually "can deal with it". log(0) indeed do not give a valid value, and the IEEE version indeed returns an invalid value. But as long as you don't play with it, the processor allows you do continue doing it. They are essentially deferring any effects until you actually try to use the result. Which I then suspect the code do not.
I can't really go around and start fixing all the code people write to change the logic... :-/
Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: bqt%softjar.se@localhost || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol