A
Andrew Thompson
I can't believe you believe that.
I suspect you missed the ' ;-) '
at the bottom.
I can't believe you believe that.
To call it an imperfect representation implies that there is a "perfect"
representation. I contend that there can be no "perfect" representation that
is finite.
Well, on the IBM 360/370 series, base = 16.Dale King said:that -0.0525
is
Big Decimal is decimal floating point. Floating point is where the numbers
are expressed as
sign * mantissa * base ^ exponent
The difference between double and BigDecimal is that:
- base = 2 for double and base = 10 for BigDecimal
- mantissa is a fixed size for double and can be unbounded for BigDecimal
Roedy Green said:If the internal form used for computation exactly match the form used
for representation, in some sense it is perfect.
People are used to the problem of 1/3 being inexact, but not 1/10.
But this is only because you don't have 3 fingers, you have 10 fingers.
If you had 3 fingers it would be exact.
But, Roedy, can you figure out why women like to count to 20 but men likeMy math prof suggested we use a prime number as base, to disabuse
people of the notions common fractions should have exact
representations.
People most naturally use base 12 numbers -- the dozen, because it has
so many factors to divide it up. Also notice the number 16 showing up
as a natural base with 16 ounces to a pound. In ancient times 60 and
360 showed up because it approximates the number of days in a year.
Martians use a base 16 system. See
http://mindprod.com/jgloss/inwords.html
Gary Labowitz said:I can't believe you believe that. No matter what base you use there is still
a finite representation of an infinite domain. Mapping the finite to the
infinite will always be inexact. At the point where the smallest change
possible to distinguish two numbers is made using the finite representation
there are still an infinite number of real values between those two finite
representations which cannot be expressed using the finite notation. If you
had a base gadzillion it still couldn't represent the set of real numbers.
It could represent a lot of them but would still not be able to represent an
infinity of them (alpha-zero).
But, Roedy, can you figure out why women like to count to 20 but men like
to count to 21?
John B. Matthews said:Perhaps you meant aleph-null, the cardinality of the rationals,
among other things.
If we used base pi, would the ratio of a circle's circumference
to its diameter be 10?
Roedy Green said:I saw a documentary a little while ago that showed how some primitive
group counted by using various body parts, each number had a
corresponding body part gesture.
they also counted forearm, upper arm etc.
Big Decimal is decimal floating point. Floating point is where the numbers
are expressed as
sign * mantissa * base ^ exponent
I saw a documentary a little while ago that showed how some primitive
group counted by using various body parts, each number had a
corresponding body part gesture.
Gary said:I can't believe you believe that.
You snipped the smiley ...
On a more serious note, one salient argument against
bases greater than two is the "wobbling precision" problem,
best known from the experience with the IBM System/360's
base-sixteen floating point. A floating-point fraction
is normalized when its leading digit is non-zero -- but
Liz said:Not true, base 16 does not require the leading bit to be zero,
BUT IT IS NORMALIZED. Your opinion may vary.
Roedy Green said:Not quite. floating point handles the scale stuff for you
automatically. BigDecimal handles it semi-automatically.
BigDecimal keeps accumplating extra precision unless you tell it to
stop. Floating point keeps roughly the same precision all the time.
Dale King said:That is a distinction between whether the representation is fixed-size
versus variable-sized. It is floating point in that the location of the
decimal point (or would that be a binary point in binary?) can move.
Liz said:It doesn't move, the exponent changes instead. In the first implementations
many years ago it moved.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.