Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
long(x=0) -> long
long(x, base=10) -> long

Convert a number or string to a long integer, or return 0L if no arguments
are given.  If x is floating point, the conversion truncates towards zero.

If x is not a number or if base is given, then x must be a string or
Unicode object representing an integer literal in the given base.  The
literal can be preceded by '+' or '-' and be surrounded by whitespace.
The base defaults to 10.  Valid bases are 0 and 2-36.  Base 0 means to(more...)

src/s/y/sympy-HEAD/sympy/polys/domains/mpelements.py   sympy(Download)
 
from sympy.mpmath.ctx_mp_python import PythonMPContext, _mpf, _mpc, _constant
from sympy.mpmath.libmp import (MPZ_ONE, fzero, fone, finf, fninf, fnan,
    round_nearest, mpf_mul, mpf_abs, mpf_lt, mpc_abs, repr_dps, int_types,
    from_int, from_float, from_str, to_rational)
    def _make_tol(ctx):
        hundred = (0, 25, 2, 5)
        eps = (0, MPZ_ONE, 1-ctx.prec, 1)
        return mpf_mul(hundred, eps)