Ejemplo n.º 1
0
 def fn(i):
     return formatd("%.2f", as_float[i]) == as_string[i]
Ejemplo n.º 2
0
 def f(x):
     return formatd('%.2f', x)
Ejemplo n.º 3
0
 def ll_strtod_formatd(fmt, x):
     return LLSupport.to_rstr(rarithmetic.formatd(LLSupport.from_rstr(fmt), x))
Ejemplo n.º 4
0
 def f():
     result = ''
     for num, string, fval in unmarshaller(buf):
         result += '%d=%s/%s;' % (num, string, formatd('%.17g', fval))
     return result
Ejemplo n.º 5
0
 def f(y):
     return rarithmetic.formatd("%.2f", y)
Ejemplo n.º 6
0
def dump_float(buf, x):
    buf.append(TYPE_FLOAT)
    s = formatd("%.17g", x)
    buf.append(chr(len(s)))
    buf += s
Ejemplo n.º 7
0
 def fn(x):
     return formatd("%.2f", x)
Ejemplo n.º 8
0
 def f(x):
     return formatd('%.2f', x)
Ejemplo n.º 9
0
 def fn(i):
     return formatd("%.2f", as_float[i]) == as_string[i]
Ejemplo n.º 10
0
 def ll_strtod_formatd(cls, fmt, x):
     return cls.to_rstr(rarithmetic.formatd(cls.from_rstr(fmt), x))
Ejemplo n.º 11
0
def str__Float(space, w_float):
    x = w_float.floatval
    s = formatd("%.12g", x)
    return space.wrap(should_not_look_like_an_int(s))
Ejemplo n.º 12
0
 def fn(x):
     return formatd("%.2f", x)
Ejemplo n.º 13
0
 def oofakeimpl(fmt, x):
     return ootype.oostring(rarithmetic.formatd(fmt._str, x), -1)
Ejemplo n.º 14
0
def dump_float(buf, x):
    buf.append(TYPE_FLOAT)
    s = formatd("%.17g", x)
    buf.append(chr(len(s)))
    buf += s
Ejemplo n.º 15
0
 def f():
     result = ""
     for num, string, fval in unmarshaller(buf):
         result += "%d=%s/%s;" % (num, string, formatd("%.17g", fval))
     return result
Ejemplo n.º 16
0
 def oofakeimpl(fmt, x):
     return ootype.oostring(rarithmetic.formatd(fmt._str, x), -1)
Ejemplo n.º 17
0
def ll_float_str(repr, f):
    return formatd("%f", f)
Ejemplo n.º 18
0
def str__Float(space, w_float):
    x = w_float.floatval
    s = formatd("%.12g", x)
    return space.wrap(should_not_look_like_an_int(s))
Ejemplo n.º 19
0
 def f(y):
     return rarithmetic.formatd("%.2f", y)