@microxpath_function('<STR_LIT>')<EOL>def number(ctx, seq=None):
if hasattr(obj, '<STR_LIT>'):<EOL><INDENT>obj = next(seq.compute(ctx), '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>obj = seq<EOL><DEDENT>yield next(to_number(obj), '<STR_LIT>')<EOL>
Yields one float, derived from the first item in the argument sequence (unless empty in which case yield NaN) as follows:

* If string with optional whitespace followed by an optional minus sign followed by a Number followed by whitespace, converte to the IEEE 754 number that is nearest (according to the IEEE 754 round-to-nearest rule) to the mathematical value represented by the string; in case of any other string yield NaN
* If boolean true yield 1; if boolean false yield 0
* If a node convert to string as if by a call to string(); yield the same value as if passed that string argument to number()