geoffwah wrote:Hi Gary
Much thanks for this information. I'm afraid however, that I don't quite follow! Would you mind expanding on the code?
Apologies
Geoff
Look at the code (even if you don't 'do FORTRAN'), it relatively straightforward:
LOG(MAX(MINLOG,X(1)))
It looks at the value (X), compares it with MINLOG (which is set internally as a constant), and then takes the log of whichever is the larger of the two. If the value of X is 0, then MINLOG will be larger. MINLOG is set to a very small number (1.E-300; about as close to zero as you might want, without being 0), but is not zero, so that LOG(MINLOG) is defined.
In other words, if X=0, then you 'trick' things by substituting a value that is really close to 0.