~maddevelopers/mg5amcnlo/3.0.4

« back to all changes in this revision

Viewing changes to madgraph/iolibs/export_v4.py

  • Committer: olivier-mattelaer
  • Date: 2021-03-25 09:12:41 UTC
  • mfrom: (78.443.30 2.9.3)
  • Revision ID: olivier-mattelaer-20210325091241-b9d2xyz0wwgc1jvs
merge with 2.9.3 -> forcing DP for CF computationn

Show diffs side-by-side

added added

removed removed

Lines of Context:
1434
1434
    
1435
1435
                if common_factor:
1436
1436
                    res = res + ')'
1437
 
    
1438
1437
                res_list.append(res)
1439
1438
        
1440
1439
        if 'jamp_optim' in self.cmd_options:
1474
1473
                    return "%id0/%id0" % (frac.numerator, frac.denominator)
1475
1474
            elif frac.real == frac:
1476
1475
                #misc.sprint(frac.real, frac)
1477
 
                return str(float(frac.real)).replace('e','d')
 
1476
                return ('%.15e' % frac.real).replace('e','d')
 
1477
                #str(float(frac.real)).replace('e','d')
1478
1478
            else:
1479
 
                return str(frac).replace('e','d').replace('j','*imag1')
 
1479
                return ('(%.15e,%.15e)' % (frac.real, frac.imag)).replace('e','d')
 
1480
                #str(frac).replace('e','d').replace('j','*imag1')
1480
1481
                
1481
1482
        
1482
1483