Fix for FPE
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Jul 2011 17:05:26 +0000 (17:05 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Jul 2011 17:05:26 +0000 (17:05 +0000)
PYTHIA6/pythia6.4.25/pythia-6.4.25.f

index 5634bfa..f553263 100644 (file)
@@ -24089,7 +24089,7 @@ C...  Total string piece energy, momentum squared, and components
      &           + (P(ICR(IS),3)+ P(ICR(IS+1),3))**2
             PZTS = P(ICR(IS),1)*TX+P(ICR(IS),2)*TY+P(ICR(IS),3)*TZ 
      &           + P(ICR(IS+1),1)*TX+P(ICR(IS+1),2)*TY+P(ICR(IS+1),3)*TZ
-            PTTS = SQRT(PPS2 - PZTS**2)
+            PTTS = SQRT(MAX(0.D0,PPS2 - PZTS**2))
 C...  Mass of string piece in units of mpi (at least 1)
             RMPI2  = 0.135D0 
             RM2STR = MAX(RMPI2,EES**2 - PPS2)