Perl: the Markov chain saw PerlMonks

Re: Irrational numbers

by syphilis (Chancellor)
 on Dec 18, 2012 at 03:01 UTC ( #1009268=note: print w/replies, xml ) Need Help??

in reply to Irrational numbers

Computers should have a more accurate representation of real numbers

Interesting idea - and well worth raising.

Perhaps related (but also a little different) is Interval Arithmetic. Just set your precision, do your calculations, and you end up with an upper and lower bound (for the given precision/inputs) - within which the exact value lies.

I've played with a C library, and a perl extension (that I wrote) that wraps that C library .... but only *played*.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Irrational numbers
by grondilu (Friar) on Dec 18, 2012 at 12:03 UTC

I would almost certainly need that. To display the result up to a certain accuracy, I assumed in the code above that the distance between two consecutive terms gets smaller and smaller. It's always possible to find a subsequence with such a property so we can define all reals as such.

I'm not sure this property is conserved with the arithmetic operations as defined above. So I would need a rigorous way of dealing with the sum or product of terms whose precision is known up to a given accuracy.

So: thanks, that'll be useful if I ever want to implement this thing for real.

Create A New User
Node Status?
node history
Node Type: note [id://1009268]
help
Chatterbox?
 [Corion]: Ouch. I just learned something about Chrome - the "version numbers" are not really feature numbers... Chrome 62 still gets new features even though Chrome 64 is out and Chrome 65 is the dev version [erix]: why ouch? Something to be said for that ,surely? LanX is a dev version [marto]: That reminds me, I made some notes somewhere with regard W::M::C, I'll get round to a PR when I've time to flesh it out

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2017-12-12 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
What programming language do you hate the most?

Results (335 votes). Check out past polls.

Notices?