2.2.1 misc.functional - Functional notation

These are function so that you can write foo(x) instead of x.foo() in certain common cases.

The module misc.functional defines the following methods:

arg( x)

Return the argument of a complex number x.

base_field( x)

Return the base field over which x is defined.

base_ring( x)

Return the base ring over which x is defined.

basis( x)

Return the fixed basis of x.

charpoly( x)

Return the characteristic polynomia of x.

conductor( x)

Return the conductor of x.

cos( x)

Return the cosine of x.

cyclotomic_polynomial( n)

decomposition( x)

Return the decomposition of x.

derivative( x)

Return the derivative of x.

det( x)

Return the determinant of x.

disc( x)

discriminant( x)

exp( x)

Return the value of the exponentation function at x.

factor( x)

Return the prime factorization of x.

gens( x)

Return the generators of x.

hecke_operator( x, n)

Return the n-th Hecke operator T_n acting on x.

imag( x)

Return the imaginary part of x.

image( x)

Return the image of x.

integral( x)

Return integrali of x.

is_even( x)

Return whether or not x is even, e.g., divisible by 2.

is_odd( x)

Return whether or not x is odd. This is by definition the complement of is_even.

isqrt( x)

Return an integer square root, i.e., the floor of a square root.

j_invariant( x)

Return the j_invariant of x.

kernel( x)

Return the kernel of x.

latex( x)

Output x formated for inclusion in a LaTeX document.

log( x, [b=None])

Return the log of x to the base b. The default base is e.

INPUT:
    x -- number
    b -- base (default: None, which means natural log)
OUTPUT:
    number

WARNING: In MAGMA, the order of arguments is reversed from in SAGE, i.e., the base is given first. We use the opposite ordering, so the base can be viewed as an optional second argument.

minimal_polynomial( x)

Return the minimal polynomial of x.

modular_degree( E)

Return the modular degree of the elliptic curve E.

ngens( x)

Return the number of generators of x.

norm( x)

Return the norm of x.

one( R)

Return the one element of the ring R.

order( x)

Return the order of x.

parent( x)

Return x.parent() if defined, or type(x) if not.

EXAMPLE:

sage: Z = parent(int(5))
sage: Z(17)
17
sage: Z
<type 'int'>

rank( x)

Return the rank of x.

real( x)

Return the real part of x.

regulator( x)

Return the regulator of x.

sin( x)

Return the sin of x.

sqrt( x)

Return a square root of x.

tan( x)

Return the tangent of x.

zero( R)

Return the zero element of the ring R.

See About this document... for information on suggesting changes.