pyyeti.nastran.bulk.format_float16

pyyeti.nastran.bulk.format_float16(value)[source]

Format a float in Nastran 16 fixed-field syntax using max precision.

Parameters:

value (float) – The value to be formatted

Returns:

field (str) – The formatted value.

Examples

>>> from pyyeti import nastran
>>> print(nastran.format_float16(1.0))
              1.
>>> print(nastran.format_float16(1.2345678))
       1.2345678
>>> print(nastran.format_float16(-123456.78e8))
-12345678000000.
>>> print(nastran.format_float16(1234567898769.0e5))
1.23456789877+17