def METHOD_NAME(card: BDFCard, ifield: int, fieldname: str, default: Optional[float]=None):
    """see ``double_or_blank``"""
    svalue = card.field(ifield)
    if isinstance(svalue, float_types):
        return svalue
    elif isinstance(svalue, integer_types):
        fvalue = float(svalue)
        warnings.warn('%s = %r (field #%s) on card must be a float or blank (not an integer) -> %s.\n'
                      'card=%s' % (fieldname, svalue, ifield, card))
        return fvalue
    elif isinstance(svalue, str):
        try:
            ivalue = int(svalue)
            fvalue = float(ivalue)
            warnings.warn('%s = %r (field #%s) on card must be a float or blank (not an integer) -> %s.\n'
                          'card=%s' % (fieldname, svalue, ifield, fvalue, card))
            return fvalue
        except Exception:
            svalue = svalue.strip().upper()
            if not svalue:
                return default
            try:
                return double(card, ifield, fieldname)
            except Exception:
                if svalue == '.':
                    return 0.
                dtype = _get_dtype(svalue)
                raise SyntaxError('%s = %r (field #%s) on card must be a float or blank (not %s).\n'
                                  'card=%s' % (fieldname, svalue, ifield, dtype, card))
    return default