[Python-Dev] stupid floating point question...
Wed, 27 Sep 2000 17:39:21 -0400
Try again? I have no idea what you're asking. Obviously, str(i) won't look
anything like str(1./6) for any integer i, so *that's* not what you're
> -----Original Message-----
> From: firstname.lastname@example.org [mailto:email@example.com]On
> Behalf Of Fredrik Lundh
> Sent: Wednesday, September 27, 2000 5:42 PM
> To: firstname.lastname@example.org
> Subject: [Python-Dev] stupid floating point question...
> each unicode character has an optional "numeric value",
> which may be a fractional value.
> the unicodedata module provides a "numeric" function,
> which returns a Python float representing this fraction.
> this is currently implemented by a large switch stmnt,
> containing entries like:
> case 0x2159:
> return (double) 1 / 6;
> if I replace the numbers here with integer variables (read
> from the character type table) and return the result to
> Python, will str(result) be the same thing as before for all
> reasonable values?