I have a problem to read the some negative exponent values from NASTRAN.bdf file. For example, this list contains z co-ordinates.
How to convert -5.75-3 into -5.75e-3 ?
I have a problem to read the some negative exponent values from NASTRAN.bdf file. For example, this list contains z co-ordinates.
How to convert -5.75-3 into -5.75e-3 ?
I had the same problem today and wrote something like this:
def nastran_float(s):
    s = s.replace('-','e-')
    s = s.replace('+','e+')
    if s[0] == 'e':
        s = s[1:]
    return float(s)