From: "Hibou57 (Yannick Duchêne)" <yannick_duchene@yahoo.fr>
Subject: Re: How to convert a string containing two hex digits to a character?
Date: Fri, 15 Jan 2010 11:59:28 -0800 (PST)
Date: 2010-01-15T11:59:28-08:00 [thread overview]
Message-ID: <95653745-d21d-4cf9-8604-315ff185021a@j5g2000yqm.googlegroups.com> (raw)
In-Reply-To: 1eb0d4a1-8ad0-442a-b9aa-2b41a3f3a8db@d20g2000yqh.googlegroups.com
On 11 jan, 16:53, Adam Beneschan <a...@irvine.com> wrote:
> I don't see this is a flaw. It's a reminder that a Float, on any
> computer, in any language, is actually limited to a subset of rational
> numbers, which means you need to exercise some caution when using
> them. Programmers who think "Float" can represent any real number,
> and that arithmetic on them is just like doing arithmetic on real
> numbers, are going to get into trouble, so it doesn't seem like a good
> thing to hide "the nature of Float as a model".
>
> Anyway, Float'Succ was not present in Ada 83 but was added in Ada 95,
> so someone must have thought it was useful for some practical purpose.
>
> -- Adam
While I agree with Dimitry Pred and Succ on Float are mostly a strange
idea, I agree Float (computer floats) and reals are not the same.
Just to give a good example about, a Python methods associated to
Float : float.as_integer_ratio(), which is defined as :
> Return a pair of integers whose ratio is exactly equal to the original float
> and with a positive denominator. Raises OverflowError on infinities and a
> ValueError on NaNs.
Found here : http://docs.python.org/library/stdtypes.html
Funny to apply this on Pi :P
Yes, Floats are a special things, they are not reals, although this
can be formalized
next prev parent reply other threads:[~2010-01-15 19:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-06 0:39 How to convert a string containing two hex digits to a character? Leslie
2010-01-06 0:43 ` Leslie
2010-01-06 1:22 ` Hibou57 (Yannick Duchêne)
2010-01-06 1:31 ` Hibou57 (Yannick Duchêne)
2010-01-06 2:05 ` Leslie
2010-01-06 2:39 ` Leslie
2010-01-06 2:42 ` Leslie
2010-01-06 21:54 ` Maciej Sobczak
2010-01-06 22:19 ` Hibou57 (Yannick Duchêne)
2010-01-09 10:50 ` Hibou57 (Yannick Duchêne)
2010-01-09 11:13 ` Hibou57 (Yannick Duchêne)
2010-01-09 11:33 ` Dmitry A. Kazakov
2010-01-09 14:50 ` Hibou57 (Yannick Duchêne)
2010-01-09 16:04 ` Dmitry A. Kazakov
2010-01-11 15:53 ` Adam Beneschan
2010-01-11 18:13 ` Dmitry A. Kazakov
2010-01-15 19:59 ` Hibou57 (Yannick Duchêne) [this message]
2010-01-15 22:06 ` John B. Matthews
2010-01-06 5:17 ` tmoran
2010-01-06 22:19 ` Leslie
2010-01-06 22:22 ` Hibou57 (Yannick Duchêne)
2010-01-07 14:26 ` John B. Matthews
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox