scientific_string/__init__.py
def string_to_float(s: str) -> float:
    """
    Double precision float in Fortran file will have form 'x.ydz' or 'x.yDz', this cannot be convert directly to float
    by Python ``float`` function, so I wrote this function to help conversion. For example,

    :param s: a string denoting a double precision number
    :return: a Python floating point number

    .. doctest::

        >>> string_to_float('1d-82')
        1e-82
        >>> string_to_float('-1.0D-82')
        -1e-82
        >>> string_to_float('+0.8D234')
        8e+233
        >>> string_to_float('.8d234')
        8e+233
        >>> string_to_float('+1.0D-5')
        1e-05
        >>> string_to_float('-0.00001')
        -1e-05
        >>> string_to_float('.8e234')
        8e+233
        >>> string_to_float('.1')
        0.1
    """
    return float(re.sub('d', 'e', s, flags=re.IGNORECASE))

    Double precision float in Fortran file will have form 'x.ydz' or 'x.yDz', this cannot be convert directly to float
    by Python ``float`` function, so I wrote this function to help conversion. For example,

    :param s: a string denoting a double precision number
    :return: a Python floating point number

    .. doctest::

        >>> string_to_float('1d-82')
        1e-82
        >>> string_to_float('-1.0D-82')
        -1e-82
        >>> string_to_float('+0.8D234')
        8e+233
        >>> string_to_float('.8d234')
        8e+233
        >>> string_to_float('+1.0D-5')
        1e-05
        >>> string_to_float('-0.00001')
        -1e-05
        >>> string_to_float('.8e234')
        8e+233
        >>> string_to_float('.1')
        0.1
    
Double precision float in Fortran file will have form 'x.ydz' or 'x.yDz', this cannot be convert directly to float
by Python ``float`` function, so I wrote this function to help conversion. For example.
Double precision float in Fortran file will have form ' x . ydz ' or ' x . yDz ' this cannot be convert directly to float by Python ` ` float ` ` function so I wrote this function to help conversion . For example .
def string_to_float(s: str) -> float:
    return float(re.sub('d', 'e', s, flags=re.IGNORECASE))
def string_to_float ( s : str ) -> float : return float ( re . sub ( 'd' , 'e' , s , flags = re . IGNORECASE ) )
Double precision float in Fortran file will have form 'x.ydz' or 'x.yDz', this cannot be convert directly to float
by Python ``float`` function, so I wrote this function to help conversion.
Double precision float in Fortran file will have form ' x . ydz ' or ' x . yDz ' this cannot be convert directly to float by Python ` ` float ` ` function so I wrote this function to help conversion .
"""
    Double precision float in Fortran file will have form 'x.ydz' or 'x.yDz', this cannot be convert directly to float
    by Python ``float`` function, so I wrote this function to help conversion. For example,

    :param s: a string denoting a double precision number
    :return: a Python floating point number

    .. doctest::

        >>> string_to_float('1d-82')
        1e-82
        >>> string_to_float('-1.0D-82')
        -1e-82
        >>> string_to_float('+0.8D234')
        8e+233
        >>> string_to_float('.8d234')
        8e+233
        >>> string_to_float('+1.0D-5')
        1e-05
        >>> string_to_float('-0.00001')
        -1e-05
        >>> string_to_float('.8e234')
        8e+233
        >>> string_to_float('.1')
        0.1
    """
a Python floating point number
doctest:.


a Python floating point number doctest : .
s
str
a string denoting a double precision number
a string denoting a double precision number