factorial of negative one (-1)
whitequill.bj at gmail.com
Wed Nov 24 10:02:37 CET 2010
On Tue, Nov 2, 2010 at 12:57 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> On 11/2/2010 6:11 AM, Hrvoje Niksic wrote:
> 1.1 .hex()
>> Here it is immediately obvious that the final digit of the infinite
>> sequence "1.1999..." is rounded from 9 to a. Printing the number with
>> any more digits would just reveal zeros, as expected.
>> Does anyone know why Python doesn't accept hex float literals in source
> Assuming that the parser would have no problem with them:
> 1. the format is relatively recent
> 2. you can write float.fromhex('<hex literal>')
> 3. it never occurred to anyone to do so
> 4. literals are values supplied by the programmer; hex float values are
> rare and when they do occur, they are usually the stored output of a
> previous .hex() in Python or similar in other languages.
> 5. too easy to confuse in quick reading with normal float literals
> 6. the format is a bit weird and too esoteric for most programmers; they
> should not be part of the basic syntax that everyone has to learn; someone
> who reads float.fromhex(something) can look it up.
> Terry Jan Reedy
I have just realized that there is a program called PyNum that would be of
great help to me, but I can't seem to figure out how to use it after
installing, or how to build it with Python 2.7
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list