Topic: WAS: Name for 128 bit integer


Author: nhayes@cyberoptics.com ("Nate Hayes")
Date: Thu, 16 Jan 2003 01:02:52 +0000 (UTC)
Raw View
If C++ had support for an interval data type, then in many situations, the
bit depth of the integer (or even floating-point number) would not be an
issue.

See the nice support that Bill Walster added to Sun's FORTRAN compiler for
interval arithmetic.

It's a shame that C++ will probably never have a data type like this. I know
interval class libraries exist for C++, but they can't do very desireable
things like syntax parsing of analytical expressions, for example.

=(

Perhaps I will invent a new language that is based completely on intervals.
Then all math routines will generate guaranteed results regardless of the
bit-depth or hardware precision of the machine.

Sincerely,

Nate


=================================================
"Witless" <witless@attbi.com> wrote in message
news:3E1E71B0.2ACF0112@attbi.com...
Dave Harris wrote:

> scottm@toast.net ("Scott Mayo") wrote (abridged):
> > The good news is that I think after 256 bit hardware integers arrive,
> > we'll be done growing integers for at least a few decades. There are
> > not too many real world problems that need integers larger than that...
>
> Are there many real world problems that need 128-bit integers?

Yes.  There are a number of physical values that require 64-bit integers.
Arithmetic over integers of size N usually requires integers of size 2N for
the results of multiplication.  Sum of product routines typically require
slightly more than 2N bits.

So 128-bit integers make useful accumulators for 64-bit arithmetic.

---
[ 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.jamesd.demon.co.uk/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.jamesd.demon.co.uk/csc/faq.html                       ]





Author: witless@attbi.com (Witless)
Date: Thu, 16 Jan 2003 07:26:46 +0000 (UTC)
Raw View
Nate Hayes wrote:

> I know interval class libraries exist for C++, but they can't do very
> desireable
> things like syntax parsing of analytical expressions, for example.

Could you provide an example of syntax parsing of analytical expressions that
you believe it would be necessary to support?

---
[ 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.jamesd.demon.co.uk/csc/faq.html                       ]