~maddevelopers/mg5amcnlo/3.0.2-alpha0-merged3.2.0

« back to all changes in this revision

Viewing changes to Template/LO/Source/kin_functions.f

  • Committer: olivier-mattelaer
  • Date: 2021-05-06 14:57:23 UTC
  • mfrom: (956.2.9 3.0)
  • Revision ID: olivier-mattelaer-20210506145723-oasykft3zdy37td2
merge with 3.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
590
590
C     4-Vector Dot product
591
591
C****************************************************************************
592
592
      implicit none
593
 
      double precision p1(0:3),p2(0:3)
 
593
      double precision p1(0:3),p2(0:3), dot2
594
594
      dot=p1(0)*p2(0)-p1(1)*p2(1)-p1(2)*p2(2)-p1(3)*p2(3)
595
595
 
596
 
      if(dabs(dot).lt.1d-6)then ! solve numerical problem 
597
 
         dot=0d0
 
596
      if(dabs(dot).lt.1d-6)then ! solve numerical problem
 
597
         dot2 = p1(0)*p2(0)+p1(1)*p2(1)+p1(2)*p2(2)+p1(3)*p2(3)
 
598
         dot2 = max(1e-99,dot2)
 
599
         if (dot/dot2.lt.1e-6) dot=0d0
598
600
      endif
599
601
 
600
602
      end