 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
blwy10 Guest
|
Posted: Wed Nov 08, 2006 5:15 am Post subject: Query on existence of a proposal for the inclusion of an inf |
|
|
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 ] |
|
| Back to top |
|
 |
blwy10 Guest
|
Posted: Wed Nov 08, 2006 6:51 am Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
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 ] |
|
| Back to top |
|
 |
Zara Guest
|
Posted: Wed Nov 08, 2006 10:10 am Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
On Tue, 7 Nov 2006 23:15:49 CST, "blwy10" <blwy10v (AT) gmail (DOT) com> wrote:
| Quote: | 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 ] |
|
| Back to top |
|
 |
Chris Jefferson Guest
|
Posted: Wed Nov 08, 2006 3:43 pm Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
Zara wrote:
| Quote: | On Tue, 7 Nov 2006 23:15:49 CST, "blwy10" <blwy10v (AT) gmail (DOT) 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 ] |
|
| Back to top |
|
 |
Zara Guest
|
Posted: Wed Nov 08, 2006 9:41 pm Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
On Wed, 8 Nov 2006 00:51:38 CST, "blwy10" <blwy10v (AT) gmail (DOT) com> wrote:
| Quote: | 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 ] |
|
| Back to top |
|
 |
Louis Lavery Guest
|
Posted: Wed Nov 08, 2006 9:41 pm Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
Zara wrote:
| Quote: | On Tue, 7 Nov 2006 23:15:49 CST, "blwy10" <blwy10v (AT) gmail (DOT) 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
Louis.
---
[ 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 ] |
|
| Back to top |
|
 |
Alberto Ganesh Barbati Guest
|
Posted: Wed Nov 08, 2006 9:44 pm Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
blwy10 ha scritto:
| Quote: | 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.
Ganesh
---
[ 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 ] |
|
| Back to top |
|
 |
Maarten Kronenburg Guest
|
Posted: Thu Nov 09, 2006 12:08 am Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
"blwy10" wrote in message
| Quote: | 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 ] |
|
| Back to top |
|
 |
blwy10 Guest
|
Posted: Thu Nov 09, 2006 5:28 am Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
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 ] |
|
| Back to top |
|
 |
Lucas Galfaso Guest
|
Posted: Thu Nov 09, 2006 5:41 pm Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
Hi,
| Quote: | 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
| Quote: |
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 ] |
|
| Back to top |
|
 |
Greg Herlihy Guest
|
Posted: Thu Nov 09, 2006 5:41 pm Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
Alberto Ganesh Barbati wrote:
| Quote: | 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 ] |
|
| Back to top |
|
 |
Arne Schmitz Guest
|
Posted: Thu Nov 09, 2006 11:22 pm Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
Zara wrote:
| Quote: | On Wed, 8 Nov 2006 00:51:38 CST, "blwy10" <blwy10v (AT) gmail (DOT) 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.
|
Interesting thought... What if one uses two arbitrary precision integers to
represent the integer and fractional part of a real number? That should be
possible.
Arne
--
[--- 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 ] |
|
| Back to top |
|
 |
Seungbeom Kim Guest
|
Posted: Fri Nov 10, 2006 7:18 am Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
Arne Schmitz wrote:
| Quote: | Zara wrote:
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 be
possible.
|
A rational number can be exactly represented with its numerator and its
denominator, but what about irrational numbers? Can you represent pi, e,
or sqrt(2) with two arbitrary precision integers for its integer and
fractional parts? The answer is no.
To be able to exactly represent real numbers would be to be able to
handle expressions without evaluating them numerically; e.g. represent
(1 + sqrt(5)) / 2
by an expression tree such as:
( / )
|
,-----+-----.
| |
( + ) 2
|
,-----+-----.
| |
1 ( sqrt )
|
5
This is certainly possible. Mathematica does it. :)
--
Seungbeom Kim
---
[ 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 ] |
|
| Back to top |
|
 |
Chris Jefferson Guest
|
Posted: Fri Nov 10, 2006 6:35 pm Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
Zara wrote:
| Quote: | On Wed, 8 Nov 2006 09:43:22 CST, "Chris Jefferson"
4zumanga (AT) gmail (DOT) com> wrote:
Zara wrote:
On Tue, 7 Nov 2006 23:15:49 CST, "blwy10" <blwy10v (AT) gmail (DOT) 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 ] |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Nov 10, 2006 7:11 pm Post subject: Re: Query on existence of a proposal for the inclusion of an |
|
|
Zara wrote:
| Quote: | On Wed, 8 Nov 2006 15:41:55 GMT, Louis (AT) laver (DOT) 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 ] |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|