Numerical noise patches for ARM. As well, added # long time to many
tests in plot/, to prevent them running out of the standard limit.
replacing HG with git in examples
FiniteStateMachine.with_final_word_out: New method

Constructs a finite state machine with final output words for all
states by implicitly reading trailing letters until a final state is
reached.

This is e.g. useful for finite state machines operating on digit
expansions: there, it is sometimes required to read a sufficient
number of trailing zeros (at the most significant positions) in order
to reach a final state and to flush all carries. In this case, this
method constructs an essentially equivalent finite state machine in
the sense that it not longer requires adding sufficiently many
trailing zeros. However, it is the responsibility of the user to make
sure that if adding trailing zeros to the input anyway, the output is
equivalent.
Small changes in the documentation of with_final_word_out
line break in docstring
FiniteStateMachine.with_final_word_out: replace "loop" by "cycle"
FiniteStateMachine.with_final_word_out: only support transitions with input labels of length 1

Raise a NotImplementedError otherwise
extending functionality of with_final_word_out and inplace-version

- there is now a flag allowing that not all states have to be final
  after calling with_final_word_out
- multi-letter inputs are now supported
- an inplace version of this function was added
- FiniteStateMAchines now has "with_final_output" so that this can
  be called after construction directly
Added explanations in documentation of Transducer.with_final_word_out
renamed parameter allow_not_accepting to allow_non_final; docstring improvements
Rewrote with_final_output to cache all intermediate results.

This reduces worst case time complexity from O(n * len(letters)) to O(n).
As we also cache non-final-states, rewrote the logic from raising an exception
to simply returning None
FiniteStateMachine.__init__: allow with_final_word_out=0

When calling FiniteStateMachine.__init__ with with_final_word_out=0,
this was previously ignored. We now explicitly check whether it is not None
to fix this defect.
trac #16255: add doctest for last commit
trac #16357: FiniteStateMachine.default_format_transition_label: accept iterable

Previous inconsistent behaviour:

sage: T = Transducer()
sage: T.default_format_transition_label([])
'\\varepsilon'
sage: T.default_format_transition_label(iter([]))
''
sage: T.format_transition_label_reversed([])
''

Change code such that \varepsilon is returned in all three instances.
FiniteStateMachine.construct_final_word_out: clarified difference between None and empty list
Trac 15921: fix some special function values and precision
added spaces after comment-symbol in code
Trac #16357: FiniteStateMachine.default_format_transition_label: accept iterable

Current inconsistent behaviour:
{{{
sage: T = Transducer()
sage: T.default_format_transition_label([])
'\\varepsilon'
sage: T.default_format_transition_label(iter([]))
''
sage: T.format_transition_label_reversed([])
''
}}}

Change code such that {{{\varepsilon}}} is returned in all three
instances.

URL: http://trac.sagemath.org/16357
Reported by: cheuberg
Ticket author(s): Clemens Heuberger
Reviewer(s): Daniel Krenn
Trac #16255: FiniteStateMachine.with_final_word_out: New method

Constructs a finite state machine with final output words for all states
by implicitly reading trailing letters until a final state is reached.

This is e.g. useful for finite state machines operating on digit
expansions: there, it is sometimes required to read a sufficient number
of trailing zeros (at the most significant positions) in order to reach
a final state and to flush all carries. In this case, this method
constructs an essentially equivalent finite state machine in the sense
that it not longer requires adding sufficiently many trailing zeros.
However, it is the responsibility of the user to make sure that if
adding trailing zeros to the input anyway, the output is equivalent.

URL: http://trac.sagemath.org/16255
Reported by: cheuberg
Ticket author(s): Clemens Heuberger, Daniel Krenn
Reviewer(s): Daniel Krenn, Sara Kropf
Trac #15921: work around Maxima fpprintprec bug and other ARM-specific problems

[https://groups.google.com/d/msg/sage-devel/oRpkswzpK38/rNVbVN2RyEcJ
Maxima uses CL FORMAT function wrongly], resulting in outputting wrong
number of digits for floats (one extra), and
contradicting its own manual on fpprintprec. In particular it outputs
too many digits on ix86 and ix86_64, which got in Sage's doctests. As a
result, doctests fail on ARM.

The fixes are to convert the results into `RealField(prec)`, with
appropriate `prec`
(at least 54, or sometimes more). This ticket also fixes ARM-specific
numerical noise stemming
from various other upstream problems, such as `eglibc` loss of precision
in `lgamma`.

URL: http://trac.sagemath.org/15921
Reported by: dimpase
Ticket author(s): Dmitrii Pasechnik
Reviewer(s): Peter Bruin, Volker Braun