Example #1
0
def test2():
    d1 = decimal('1.0')
    d2 = decimal('2.0')
    d3 = decimal('3.0')
    d4 = decimal('4.0')
    d5 = decimal('5.0')
    print(d1 + d2 + d3 + d4 + d5)
Example #2
0
def test2():
    d1 = decimal('1.0')
    d2 = decimal('2.0')
    d3 = decimal('3.0')
    d4 = decimal('4.0')
    d5 = decimal('5.0')
    print(d1 + d2 + d3 + d4 + d5)
Example #3
0
def calculate_mandelbrot(real, imag):
    c_real = real
    c_imag = imag

    for i in range(1000):
        real = (real * real) - (imag * imag) + c_real
        imag = (real * imag) + (real * imag) + c_imag
        if (real * real) + (imag * imag) > decimal('4.0'):
            return False
    return True
Example #4
0
def calculate_mandelbrot(real, imag):
    c_real = real
    c_imag = imag

    for i in range(1000):
        real = (real * real) - (imag * imag) + c_real
        imag = (real * imag) + (real * imag) + c_imag
        if (real * real) + (imag * imag) > decimal('4.0'):
            return False
    return True
Example #5
0
def test_mandelbrot():
    t0 = flypy.bltins.clock()
    calculate_mandelbrot(decimal('0.1'), decimal('0.1'))
    t1 = flypy.bltins.clock()
    return t1 - t0
Example #6
0
def test():
    result = decimal('0.0')
    for i in range(100000):
        x = decimal('1.0')
        result = result + x
    print(result)
Example #7
0
def test():
    result = decimal('0.0')
    for i in range(100000):
        x = decimal('1.0')
        result = result + x
    print(result)
Example #8
0
def test_mandelbrot():
    t0 = flypy.bltins.clock()
    calculate_mandelbrot(decimal('0.1'), decimal('0.1'))
    t1 = flypy.bltins.clock()
    return t1 - t0