extracting hex mant+exp from double?
Tim Peters
tim.one at home.com
Sun Jun 10 01:49:02 EDT 2001
[Mike C. Fletcher, after staring at
>>> math.frexp(.1)
(0.80000000000000004, -3)
>>> m = _[0]
]
> It's a bleeding anonymous magic variable man! Who let that into the
> language! The variable is _magic_ I say. Wizardry! Sorcery! Appearing
> without explicit assignment!
> Pact-with-the-devil-and-dancing-at-midnight-curses-and-hexes!
> Spawn-of-PERL!
> Magic, I say!
>
> [I spent 2 minutes trying to figure out why you were translating 0, what
> language you were using (base-2-eese?), and what special meaning 0 had
> for translation tables. How did I miss something so... icky...
> getting added?]
>
> Ick,
> Mike
Hunting this down in CVS, Guido added it in ceval.c, Revision 2.64.2.6, on
Thu Apr 28 12:51:01 1994 UTC. I agree it's *so* un-Pythonic that Python
really wouldn't be Python without it <wink>.
practicality-beats-purity-ly y'rs - tim
More information about the Python-list
mailing list