Simplify numerical evaluation of BuiltinFunctions
Merge remote-tracking branches 'origin/u/jdemeyer/ticket/17131' and 'origin/u/jdemeyer/ticket/17133' into ticket/17130
Merge branch 'u/jdemeyer/ticket/17130' of trac.sagemath.org:sage into 6.5beta1

* 'u/jdemeyer/ticket/17130' of trac.sagemath.org:sage:
  Simplify numerical evaluation of BuiltinFunctions

Conflicts:
	src/sage/functions/other.py
17130: reviewer's patch: fix typo
Fix Trac #17328 again in a better way
Call the factorial() method of an Integer
Trac #17407: replace R[x] by R['x'] in doctests
17407: more doctest fixes
Undo non-trivial changes
17407: even more dotest fixes, should be all
17407: more fixes
Fix numerical noise
Fix more numerical noise
Trivial doctest reformatting
Trac #17130: Fix coercion bugs in symbolic functions

This uses coercion correctly:
{{{
sage: bessel_Y._eval_(RealField(300)(1), 1.0)
-0.781212821300289
}}}

However, it seems that `__call__()` coerces this result back to the
first parent, giving false precision:
{{{
sage: bessel_Y(RealField(300)(1), 1.0)
-0.781212821300288684511770043172873556613922119140625000000000000000000
000000000000000000000
}}}

Same issue with functions which are evaluated using Maxima, which does
not support arbitrary precision:
{{{
sage: R=RealField(300); elliptic_eu(R(1/2), R(1/8))
0.4950737320232014848642165816272608935832977294921875000000000000000000
00000000000000000000
}}}

The `gamma_inc()` function also mishandles parents:
{{{
sage: gamma_inc(float(0), float(1))
AttributeError: type object 'float' has no attribute 'precision'
}}}

----

Apart from this, this branch also removes lots of boilerplate from
`_eval_` like
{{{
if not isinstance(x, Expression) and not isinstance(y, Expression) and \
        (is_inexact(x) or is_inexact(y)):
    x, y = coercion_model.canonical_coercion(x, y)
    return self._evalf_(x, y, s_parent(x))
}}}
by wrapping `_eval_` inside the new method `_evalf_or_eval_` which
automatically does this boilerplate.

----

Possible follow-ups: #10133, #14766, #16587, #17122, #15200

URL: http://trac.sagemath.org/17130
Reported by: jdemeyer
Ticket author(s): Jeroen Demeyer
Reviewer(s): Ralf Stephan
Trac #17407: Replace R[x] by R['x'] in doctests

This ticket is split off from #10483 and contains the trivial doctest
fixes such that we can concentrate on the less trivial stuff in #10483.

URL: http://trac.sagemath.org/17407
Reported by: jdemeyer
Ticket author(s): Simon King, Ralf Stephan
Reviewer(s): Jeroen Demeyer
Added back in after bad merge.
Trac #17409: Random failure in sets/set.py

{{{
sage -t --long src/sage/sets/set.py
**********************************************************************
File "src/sage/sets/set.py", line 102, in sage.sets.set.Set
Failed example:
    sorted(Set([Sequence([3,1], immutable=True), 5, QQ,
Partition([3,1,1])]))
Expected:
    [Rational Field, [3, 1], [3, 1, 1], 5]
Got:
    [5, Rational Field, [3, 1], [3, 1, 1]]
**********************************************************************
}}}

URL: http://trac.sagemath.org/17409
Reported by: vbraun
Ticket author(s): Travis Scrimshaw
Reviewer(s): Volker Braun