Did I find the right examples for you? yes no

All Samples(13)  |  Call(8)  |  Derive(0)  |  Import(5)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/objspace/std/floatobject.py   plexnet(Download)
from pypy.objspace.std.longobject import W_LongObject
from pypy.rlib.rarithmetic import ovfcheck_float_to_int, intmask, isinf
from pypy.rlib.rarithmetic import formatd
 
import math
def repr__Float(space, w_float):
    x = w_float.floatval
    s = formatd("%.17g", x)
    return space.wrap(should_not_look_like_an_int(s))
 
def str__Float(space, w_float):
    x = w_float.floatval
    s = formatd("%.12g", x)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/lltypesystem/ll_str.py   plexnet(Download)
from pypy.rpython.lltypesystem.lltype import GcArray, Array, Char, malloc
from pypy.rpython.annlowlevel import llstr
from pypy.rlib.rarithmetic import r_uint, formatd
 
CHAR_ARRAY = GcArray(Char)
def ll_float_str(repr, f):
    return llstr(formatd("%f", f))
ll_float_str._pure_function_ = True
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/module/ll_strtod.py   plexnet(Download)
        def oofakeimpl(fmt, x):
            return ootype.oostring(rarithmetic.formatd(fmt._str, x), -1)
 
        return extdef([str, float], str, 'll_strtod.ll_strtod_formatd',
                      llimpl=llimpl, oofakeimpl=oofakeimpl,

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rlib/test/test_rarithmetic.py   plexnet(Download)
    def test_formatd(self):
        from pypy.rlib.rarithmetic import formatd
        def f(x):
            return formatd('%.2f', x)
        res = self.ll_to_string(self.interpret(f, [10/3.0]))

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/c/test/test_extfunc.py   plexnet(Download)
def test_rarith_formatd():
    from pypy.rlib.rarithmetic import formatd
    def fn(x):
        return formatd("%.2f", x)
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/module/test/test_ll_strtod.py   plexnet(Download)
        def f(y):
            return rarithmetic.formatd("%.2f", y)
 
        assert self.ll_to_string(self.interpret(f, [3.0])) == f(3.0)
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rlib/test/test_rmarshal.py   plexnet(Download)
import py
import marshal
from pypy.rlib.rmarshal import *
from pypy.annotation import model as annmodel
from pypy.rlib.rarithmetic import formatd
    def f():
        result = ''
        for num, string, fval in unmarshaller(buf):
            result += '%d=%s/%s;' % (num, string, formatd('%.17g', fval))
        return result