Topic: Query on existence of a proposal for the inclusion of an infinite precision floating point type/class into the C++ Standard/TR2


Author: "Chris Jefferson" <4zumanga@gmail.com>
Date: Fri, 10 Nov 2006 12:35:10 CST
Raw View
Zara wrote:
> On Wed,  8 Nov 2006 09:43:22 CST, "Chris Jefferson"
> <4zumanga@gmail.com> wrote:
>
> >
> >Zara wrote:
> >> On Tue,  7 Nov 2006 23:15:49 CST, "blwy10" <blwy10v@gmail.com> wrote:
> >>
> >>
> >> An infinite precision floating point class is impossible.
> >>
> >> In the case of integer, it is possible because the number of intergers
> >> requiring infinite storage is, at most, two (+/-infinite), while for
> >> real numbers the number of values requiring inifinite storage is
> >> infinite (all transcendent numbers except, maybe, all those related to
> >> well known constants such as e and pi)
> >
> >While I'm not sure an infinite precision floating point class is
> >practical, it is definatly possible. This is due to the fact that the
> >number of COMPUTABLE floating point numbers is countably infinate, and
> >each one can be expressed in a finite length string (how it is
> >computable).
> >
> >Of course manipulating such numbers would be very difficult... :)
> >
>
> The number of REAL computable numbers is infinite, and cannot be
> represented by a finite string. Shoudl Immention pi or e?
>

The number of integers is also infinite, so does that mean they cannot
each be represented by a finite string? pi can easily be represented
using two ascii characters :)

Chris

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: kuyper@wizard.net
Date: Fri, 10 Nov 2006 13:11:09 CST
Raw View
Zara wrote:
> On Wed,  8 Nov 2006 15:41:55 GMT, Louis@laver.demon.co.uk (Louis
> Lavery) wrote:
>
> >Zara wrote:
.
> >> An infinite precision floating point class is impossible.
> >
> >LEDA REAL
> >
>
> I am stubborn on this: a finite representation of *any* real number is
> impossible.

So the real numbers 0, 1, 2, 0.5, 1/3, sqrt(2), and pi,  cannot be
represented by the strings "0", "1", "2", "0.5", "1/3", "sqrt(2)", and
"pi"? If so, how did you know which real numbers I was referring to? Or
are you arguing that those aren't finite representations?

I suspect that what you actually mean is "a finite representation of
*all* real numbers is impossible". However, in the phrase "infinite
precision" the word "infinite" doesn't refer to the number of different
values that can be represented, but only to the precision with which
the values are represented.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: francis@robinton.demon.co.uk (Francis Glassborow)
Date: Sat, 11 Nov 2006 22:55:50 GMT
Raw View
In article <4555166C.60509@erdani.org>, "Andrei Alexandrescu (See
Website For Email)" <SeeWebsiteForEmail@erdani.org> writes
>A good point is to stop abusing terminology: "infinite precision" does
>not really describe what's going on, maybe "unbounded precision" or the
>consecrated "arbitrary precision" would fare closer.

Yes, I get more than a little irritated by the throwing around of
'infinite' in this context. I think that computers have problems with
infinite though less so with unbounded. Even unbounded has its problems.
You cannot express any irrational value exactly other than by giving an
algorithm for computing it. We can talk of pi, the square root of 2 etc.
but when we want a sequence of bits that expresses it we have to decide
what precision will meet our needs. In this way floating point values
are different to integers. Any specific integer can, given sufficient
memory, be represented exactly. The same applies to rationals but not to
reals. We can talk about the cube root of three but we can never express
it as a sequence of bits (well we can in the more general view by
providing a computer program that will run indefinitely generating a
representation as a sequence of bits)


--
Francis Glassborow      ACCU
Author of 'You Can Do It!' and "You Can Program in C++"
see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: "Maarten Kronenburg" <M.Kronenburg@inter.nl.net>
Date: Wed, 8 Nov 2006 18:08:46 CST
Raw View
"blwy10"  wrote in message
> Hello all,
>
> This is my first time posting here so pardon if I lack any etiquette.
> Anyway, I would like to ask if there was any paper submitted to the C++
> Standards Committee with regards to an infinite precision floating
> point type or class, or if there are any plans to do so. A brief check
> on the papers available on
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/ did not reveal
> anything, though I may have accidentally overlooked some items. I
> understand that there is already a proposal submitted with regards to
> infinite precision integers ("Proposal for an Infinite Precision
> Integer for Library Technical Report 2, Revision 1" N2020 2006-06-22),
> so I was just wondering if there was a similar paper for its floating
> point counterpart.

Benjamin,
The integer is "infinite precision", as its precision is set by the program
to any precision required to hold its value.
The floating point would be the "arbitrary precision real", that is its
precision
is set by the user to a certain number of decimals. This real would consist
of two
infinite precision integers, one for the mantissa and one for the exponent.
The infinite precision integer has an important field of application:
cryptography,
and is therefore in some form likely to be accepted by the LWG.
The arbitrary precision real does not seem to have such an obvious
application,
but on the other hand GMP has it already.
Do you have some application area for the arbitrary precision real?
Another extra with arbitrary precision real is that the elementary
transcendental
functions like exp, log, sin, cos, atan etc, should also be implemented.
Regards, Maarten.




---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: "blwy10" <blwy10v@gmail.com>
Date: Wed, 8 Nov 2006 23:28:08 CST
Raw View
Hi,

Ah I see. Pardon my ignorance, as I am only a high school and do not
know much about this area in computer science and mathematics.

As for specific application of arbitrary precision reals, I do not have
any specific application, but I am under the impression that there is
always some kind of use for such bignums, though what for I am always
not sure. [I like these utilities on standby just in case]

Thanks again for your responses, which have helped to enlighten me more
on these issues.

Benjamin

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: arne.schmitz@gmx.net (Arne Schmitz)
Date: Thu, 9 Nov 2006 17:22:14 GMT
Raw View
Zara wrote:

> On Wed, =A08 Nov 2006 00:51:38 CST, "blwy10" <blwy10v@gmail.com> wrote:
>=20
>>Hmm...I never thought of it that way before.
>>
>>But then in that case, what do you call types such as mpf_t found in
>>GMP? And has there ever been a proposal for the inclusion of such a
>>type/class into the C++ Standard?
>>
>=20
> mpf_t is simply a floating point with a huge mantissa. But you are
> unable to represent 0.1 exactly with it, so the problem remains the
> same.

Interesting thought... What if one uses two arbitrary precision integers =
to
represent the integer and fractional part of a real number? That should b=
e
possible.

Arne

--=20
[--- PGP key FD05BED7 --- http://www.root42.de/ ---]

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: "Greg Herlihy" <greghe@pacbell.net>
Date: Thu, 9 Nov 2006 11:41:59 CST
Raw View
Alberto Ganesh Barbati wrote:
> blwy10 ha scritto:
> > Hmm...I never thought of it that way before.
> >
> > But then in that case, what do you call types such as mpf_t found in
> > GMP? And has there ever been a proposal for the inclusion of such a
> > type/class into the C++ Standard?
> >
>
> The GMP doc itself uses the term "arbitrary precision" on page 16 which
> sounds quite a good term to me. Maybe "user-controlled precision" could
> be even better.

I think "unlimited precision" sounds more appealling than "arbitrary
precision". The latter sounds as if the library has no control over -
or even no way to determine - the precision of its calculations.

Greg

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: "Lucas Galfaso" <lgalfaso@gmail.com>
Date: Thu, 9 Nov 2006 11:41:38 CST
Raw View
Hi,

> An infinite precision floating point class is impossible.

  This affirmation is false. Even when there is no way to have a class
that can represent all real number, you may have a class that is able
to represent all computable numbers. Just for the record, think of any
number (sqrt 2, e, pi, e ** pi, 5 ** 1/7), if you are not Chaitin, the
chances are this number is computable.
  Here is a report that compare some of the current implementations
http://www.kyoto-su.ac.jp/~yasugi/page/Kakenhi/mueller.pdf

Regards,
  Lucas Galfaso

>
> Zara
>
> ---
> [ comp.std.c++ is moderated.  To submit articles, try just posting with ]
> [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
> [              --- Please see the FAQ before posting. ---               ]
> [ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: me_zara@dea.spamcon.org (Zara)
Date: Fri, 10 Nov 2006 15:51:24 GMT
Raw View
On Wed,  8 Nov 2006 15:41:55 GMT, Louis@laver.demon.co.uk (Louis
Lavery) wrote:

>Zara wrote:
>> On Tue,  7 Nov 2006 23:15:49 CST, "blwy10" <blwy10v@gmail.com> wrote:
>>
>>
>>>This is my first time posting here so pardon if I lack any etiquette.
>>>Anyway, I would like to ask if there was any paper submitted to the C++
>>>Standards Committee with regards to an infinite precision floating
>>>point type or class, or if there are any plans to do so. A brief check
>>>on the papers available on
>>>http://www.open-std.org/jtc1/sc22/wg21/docs/papers/ did not reveal
>>>anything, though I may have accidentally overlooked some items. I
>>>understand that there is already a proposal submitted with regards to
>>>infinite precision integers ("Proposal for an Infinite Precision
>>>Integer for Library Technical Report 2, Revision 1" N2020 2006-06-22),
>>>so I was just wondering if there was a similar paper for its floating
>>>point counterpart.
>>>
>>
>>
>> An infinite precision floating point class is impossible.
>
>LEDA REAL
>

I am stubborn on this: a finite representation of *any* real number is
impossible.
LEDA REAL represents correctly the algebraic part of the real numbers.
Thus, it fails to represent pi or e.
Boots rational represents correctly rational numbers. Thus, it fauls
to represnet pi or e.
GMP allows us to extend tha preccission odf the mantissa of tha
floating point representation of a rela number. Thus, it fails to
represent pi, e or 0.1

As I noted on other message, the infinite quantityof real numberts is
too much of an infinity.

Zara

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: me_zara@dea.spamcon.org (Zara)
Date: Fri, 10 Nov 2006 15:51:43 GMT
Raw View
On Wed,  8 Nov 2006 09:43:22 CST, "Chris Jefferson"
<4zumanga@gmail.com> wrote:

>
>Zara wrote:
>> On Tue,  7 Nov 2006 23:15:49 CST, "blwy10" <blwy10v@gmail.com> wrote:
>>
>>
>> An infinite precision floating point class is impossible.
>>
>> In the case of integer, it is possible because the number of intergers
>> requiring infinite storage is, at most, two (+/-infinite), while for
>> real numbers the number of values requiring inifinite storage is
>> infinite (all transcendent numbers except, maybe, all those related to
>> well known constants such as e and pi)
>
>While I'm not sure an infinite precision floating point class is
>practical, it is definatly possible. This is due to the fact that the
>number of COMPUTABLE floating point numbers is countably infinate, and
>each one can be expressed in a finite length string (how it is
>computable).
>
>Of course manipulating such numbers would be very difficult... :)
>

The number of REAL computable numbers is infinite, and cannot be
represented by a finite string. Shoudl Immention pi or e?

Zara

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: "blwy10" <blwy10v@gmail.com>
Date: Tue, 7 Nov 2006 23:15:49 CST
Raw View
Hello all,

This is my first time posting here so pardon if I lack any etiquette.
Anyway, I would like to ask if there was any paper submitted to the C++
Standards Committee with regards to an infinite precision floating
point type or class, or if there are any plans to do so. A brief check
on the papers available on
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/ did not reveal
anything, though I may have accidentally overlooked some items. I
understand that there is already a proposal submitted with regards to
infinite precision integers ("Proposal for an Infinite Precision
Integer for Library Technical Report 2, Revision 1" N2020 2006-06-22),
so I was just wondering if there was a similar paper for its floating
point counterpart.

Thank you and have a good day.
Benjamin Lau

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: me_zara@dea.spamcon.org (Zara)
Date: Wed, 8 Nov 2006 05:47:34 GMT
Raw View
On Tue,  7 Nov 2006 23:15:49 CST, "blwy10" <blwy10v@gmail.com> wrote:

>This is my first time posting here so pardon if I lack any etiquette.
>Anyway, I would like to ask if there was any paper submitted to the C++
>Standards Committee with regards to an infinite precision floating
>point type or class, or if there are any plans to do so. A brief check
>on the papers available on
>http://www.open-std.org/jtc1/sc22/wg21/docs/papers/ did not reveal
>anything, though I may have accidentally overlooked some items. I
>understand that there is already a proposal submitted with regards to
>infinite precision integers ("Proposal for an Infinite Precision
>Integer for Library Technical Report 2, Revision 1" N2020 2006-06-22),
>so I was just wondering if there was a similar paper for its floating
>point counterpart.
>

An infinite precision floating point class is impossible.

In the case of integer, it is possible because the number of intergers
requiring infinite storage is, at most, two (+/-infinite), while for
real numbers the number of values requiring inifinite storage is
infinite (all transcendent numbers except, maybe, all those related to
well known constants such as e and pi)

Some of the problems with double and float may be treated using a
rational class such as that from Boost (i.e. having an exact
representation of 0,1=1/10), but there is no way to have an exact
representation of all real numbers because there a "fat lot infinite
of them" ;-)

Zara

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: "blwy10" <blwy10v@gmail.com>
Date: Wed, 8 Nov 2006 00:51:38 CST
Raw View
Hmm...I never thought of it that way before.

But then in that case, what do you call types such as mpf_t found in
GMP? And has there ever been a proposal for the inclusion of such a
type/class into the C++ Standard?

Thank you.

Benjamin Lau

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: me_zara@dea.spamcon.org (Zara)
Date: Wed, 8 Nov 2006 15:41:43 GMT
Raw View
On Wed,  8 Nov 2006 00:51:38 CST, "blwy10" <blwy10v@gmail.com> wrote:

>Hmm...I never thought of it that way before.
>
>But then in that case, what do you call types such as mpf_t found in
>GMP? And has there ever been a proposal for the inclusion of such a
>type/class into the C++ Standard?
>

mpf_t is simply a floating point with a huge mantissa. But you are
unable to represent 0.1 exactly with it, so the problem remains the
same.

I doubt there will be any proposal of this kind, but I don not really
know it.

Zara

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: "Chris Jefferson" <4zumanga@gmail.com>
Date: Wed, 8 Nov 2006 09:43:22 CST
Raw View
Zara wrote:
> On Tue,  7 Nov 2006 23:15:49 CST, "blwy10" <blwy10v@gmail.com> wrote:
>
>
> An infinite precision floating point class is impossible.
>
> In the case of integer, it is possible because the number of intergers
> requiring infinite storage is, at most, two (+/-infinite), while for
> real numbers the number of values requiring inifinite storage is
> infinite (all transcendent numbers except, maybe, all those related to
> well known constants such as e and pi)

While I'm not sure an infinite precision floating point class is
practical, it is definatly possible. This is due to the fact that the
number of COMPUTABLE floating point numbers is countably infinate, and
each one can be expressed in a finite length string (how it is
computable).

Of course manipulating such numbers would be very difficult... :)

Chris

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]