Error message for logarithmic function (LOG(x) and EXP(x)) in source.f file

Dear FLUKA experts,

I wrote a source.f file, in which the calculation needs the logarithmic function LOG(x) and EXP(x). But when I run the file, the error message showed that the line with LOG (x) was not right. When I removed those lines, everything goes normal. Is there any limitation using LOG(x) and EXP(x) in FLUKA?

Thanks in advance for your help.

Best regards,

Jingfang
source_pristinv4test.f (9.5 KB)
test_DDD.flair (3.3 KB)
test_DDD.inp (2.5 KB)

Dear Jingfang,

after a quick glance on your source routine, the error seems that the LOG() function get a negative number as argument:

CALL FLNRRN(RGAUSS) ! which returns a normal gaussian number RGAUSS
FLOG = RGAUSS * SQRT ( TWOTWO * PIPIPI )
PRIM = LOG (FLOG)

Cheers,
David

Dear @horvathd

Thanks for your quick reply.
For your reminder, I found the mistake. I misunderstood the number RGAUSS. The range for the value for RGAUSS is (+/- infinite). The distribution for RGAUSS is gaussian. Now everything is clear. I need to rewrite this paragraph of code to make it work.

Cheers,
Jingfang