Big Int

An arbitrary precision integer. Unlike machine integers which have a fixed size (like 32-bits), a BigInt will grow in memory to whatever size is required.

A good way to implement arbitrarily-sized integers is to use base256 encoding and using simple ASCII strings ("Ascii-Coded Binary"). -- MarkJanssen

See BigNum, which can become an arbitrary precision real number.

To make an arbitrary precision real number, use Bigint to make an "Rational" class that simply uses two BigInts as numerator and denominator. Now you have an exact, lossless way to represent any "real" number.

[Actually, it's still lossy, unless you can specify non-repeating infinite numbers for the numerator and/or denominator.]

Sorry, I should have said, "any *finite* real number"....

There are several implementations of this in CeePlusPlus to provide not only storage of the values but also for arithmetic operations.

{Yes, and for C#, Java, etc. Note that in a strict sense, reals are a superset of rationals.}

("reals are a superset of rationals") Umm, no, not necessarily. It depends on the definition of real. My definition of "real" includes the traditional English definition of "reality" where everything can be represented by integer rationals, because there's no unseen, unobservable "spookiness" and therefore it's all countable. Now, if you include the idealist, Platonic, un-real, uncountable world of geometry <grin>, then you are right. I think I've just made this distinction clear for the whole field actually. Your numbers, as I know them, are called the irrationals. -- MarkJanssen20130605

{By "strict sense", I meant the usual mathematical meaning of 'real' which indeed includes irrational numbers such as Pi. Pi cannot be accurately represented as a rational. See http://mathworld.wolfram.com/RealNumber.html}

pi should not be considered real, rather transcendental. The distinction for real I have noted above. Transcendental is the term for those items which reference a platonic ideal that can and never will be attained. As such, the transcendental is akin to the uncountable, distinct from such lowly objects as a square. Math has simply been wrong and confused. -- MarkJanssen20130605

[Transcendental numbers are irrational real numbers that are not algebraic. Beware of letting your personal feelings about terminology have an impact on your ability to use recognised definitions, otherwise you will wind up speaking a uselessly PrivateLanguage that possesses confusing homonyms with the language the rest of us use.]

I understand your concern, but the language "the rest of us use" is precisely the reason why re-evaluation may be necessary. Language can tend to reinforce itself over time, amplifying small misuses of terms until everyone trusts the common use, far after it has become invalid.

[This is true, and it's why academic writing frequently goes to extraordinary effort to define the terms it uses. However, without such extraordinary effort, writing with terminology that deviates from common use quickly becomes incomprehensible.]

[[Transcendental numbers are also irrational (apart from perhaps 0), but real numbers may or may not be. Your concern about PrivateLanguage is valid, but I'm finding myself having to sort out the confusion between two domains. The concern is in physics, where the notion of pi, a platonic idea is being applied to a real or physical domain. I've been working on finding the relationship between them by relating Feigenbaum's constant, phi, and the "diameter" of the square. I'm looking for collaborators because I haven't done proof for a long time. As far as terminology, one issue is whether zero should be considered "transcendental" since it is not the root of any degree polynomial. -- MarkJanssen]]

It is certainly true that pi cannot be represented as a rational because a circle, by geometrical definition, is an abstraction defined as an infinitely-sided polygon - so is uncountably large. But the diagonal of a square (a type of diameter you might say), given unit sides of one, should, in theory, be rational. Added 19:20: It's like this, the diagonal of the square can be represented by a continued fraction. It is already known that continued fractions are rational if the number of terms n is rational. I'm arguing that for a square, this is countable, though infinite, in contrast to what a circle would be.

{Why do you think it should be rational?}

I'd say pi is irrational and "real" dependent upon if or when space-time is curved. On a sphere, pi (that is, the ratio of the circumference to the diameter) can be made into 2.0. And on further thought, I question whether sqrt(2) is truly irrational... but I'm sure I'll come back around. -- MarkJanssen

(Or am I getting a bit surreal?)

{Surreal? No, dude, I think you're stoned. :-) Circles are planar, so Pi is constant. Beware of conflating a circle with some projection of a circle. If you can prove sqrt(2) is not irrational, I'd like to see it. Until then, the proof that sqrt(2) is irrational remains solid.}

Well, in physics, they posit curved spacetime, so it is not unreasonable to consider that the ration of a circumference (say the equator of a globe), divided by its diameter (a line going through it's pole), is not equal to 3.14... This idea was already suggested by noting that the angles of a triangle do not add up to 180 on a sphere. As for a counter-proof of sqrt(2), I think I've hinted at it above, using the idea of diameter.

{You're conflating fundamental geometry with projections of that geometry. Hinting at a proof (or counter-proof) is not a proof. At best, it's a conjecture.}

In a non-euclidean space, the ratio of a circle's circumference to its diameter isn't a constant. It will depend on size of the circle and, if the curvature of the space varies with where you are, where the circle is and its orientation. This doesn't change the value of pi. You just define it as the limit of the ratio as the diameter of the circle goes to zero.

{Ah, indeed. Yes.}


If you're going to use a physical definition of pi instead of a mathematical one, then it would have to come complete with the error bounds resulting from the available precision when making the measurements of circumferences and diameters used to define it.


See also FloatingPointCurrency


JuneThirteen


EditText of this page (last edited May 3, 2014) or FindPage with title or text search