Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > calculating of square roots ?
2006-06-29 00:59
Trifox
Account closed

Registered: Mar 2006
Posts: 108
calculating of square roots ?

hi all, for my newest project i am in urgent need to calculate the length of a 2d vector, reminding pythagorian math i remember that i have to calculate the roots of a fixed point (8bits.8bits) number, how can that be mastered in a convenient way ?!?!?!

thx
 
... 92 posts hidden. Click here to view all posts....
 
2006-07-07 09:57
WVL

Registered: Mar 2002
Posts: 886
Quote: I agree that this is getting out-of-topic, which started because I was defending an 80s math teacher and the constatation (nothing you can do about it, sorry :) that, with current methods, you cannot calculate pure irrationals explicitly in this lifetime. I could start debating the true nature of numbers, Gödel's theorem, infinity, limits, whether the universe is discrete or continuous, the validity of quantum mechanics, etc. but I would recommend everyone to consult scientific literature for this.

One last thing, though. Graham: saying that infinity doesn't exist, is saying that purely irrational numbers don't exist. Or limits, or series, or gradients, or fractals, or...

For example, if infinity doesn't exist, then we couldn't possibly calculate

lim (n->+Inf) 1 + 1/2 + 1/4 + ... + (1/2)^n

now could we?


/me immediately recognizes it as the number of boobs on the average chick!
2006-07-07 11:05
Graham
Account closed

Registered: Dec 2002
Posts: 990
Quote: I agree that this is getting out-of-topic, which started because I was defending an 80s math teacher and the constatation (nothing you can do about it, sorry :) that, with current methods, you cannot calculate pure irrationals explicitly in this lifetime. I could start debating the true nature of numbers, Gödel's theorem, infinity, limits, whether the universe is discrete or continuous, the validity of quantum mechanics, etc. but I would recommend everyone to consult scientific literature for this.

One last thing, though. Graham: saying that infinity doesn't exist, is saying that purely irrational numbers don't exist. Or limits, or series, or gradients, or fractals, or...

For example, if infinity doesn't exist, then we couldn't possibly calculate

lim (n->+Inf) 1 + 1/2 + 1/4 + ... + (1/2)^n

now could we?


Well... infinity doesn't exist and we cannot calculate that. We can only prove a certain convergence.
2006-07-07 11:06
_V_
Account closed

Registered: Jan 2002
Posts: 124
WVL :)

Quantum theory: Copenhagen all the way, because statistics basically can be interpreted as "many worlds" already ("if I repeat this experiment in an infinity of worlds, half those worlds will have this outcome, the others this one"). Also, after seeing that you can create metrics in general relativity which allow for a "portal" to an infinity of worlds in the singularity of a black hole, I've had my fill of "many worlds" :).
2006-07-07 11:18
enthusi

Registered: May 2004
Posts: 675
"seeing that you can create metrics in general relativity which allow for a "portal" to an infinity of worlds in the singularity of a black hole"

Hehe, that's less obvious I'd say.

And infinity is an idea or maybe concept, not a value.

Lets rather focus on something to apply 16->8.8 square roots to :)

'We' dont need wondering morons (me included :) but code :)
2006-07-07 11:31
_V_
Account closed

Registered: Jan 2002
Posts: 124
Graham: Actually, I can calculate that series without needing to prove convergence and whatnot.

Let s = lim (n->+Inf) 1 + (1/2) + ... + (1/2)^n
= sum (n:0->+Inf) (1/2)^n

Now,

s = sum (n:0->+Inf) (1/2)^n
= 1 + sum (n:1->+Inf) (1/2)^n
= 1 + sum (n-1:0->+Inf) (1/2)^[(n-1)+1]
= 1 + (1/2) * sum (n-1:0->+Inf) (1/2)^(n-1)

That's the same series as before, except that we have (n-1) as an index rather than n. And thus the infinite series we're looking at has the amazing property that

s = 1 + (1/2) * s

Which leads to

s = 2.

I have never said that infinity is a number in the conventional sense (neither is 0 actually - ever tried dividing by it?), but even numberless numbers are there nonetheless and we have to take them into account. Mathematically speaking, infinity is a conceptual step you have to take and when you do, some fun things can be done.

But, you're not alone on this. From Wikipedia:

"Leopold Kronecker rejected the notion of infinity and began a school of thought, in the philosophy of mathematics called finitism, which led to the philosophical and mathematical school of mathematical constructivism." :)
2006-07-07 14:26
Graham
Account closed

Registered: Dec 2002
Posts: 990
@_V_: Nopes, you have not calculated the result with the series, you have just proven equivalence of the series with another formula and then used that to calculate :)
2006-07-07 22:01
Cybernator

Registered: Jun 2002
Posts: 154
_V_ wrote:

> I agree that this is getting out-of-topic,
> which started because I was defending an 80s
> math teacher

What's wrong with going off-topic? How else would you start a conversation like this? ;) To tell the truth, to me it seems more interesting than calculating square roots on C64. (yeah, something's definitely wrong with me)

Cruzer wrote:

> Or maybe I'm just making up excuses why I had so low math grades in school. :)

Nice to know I'm not alone at this. ;)
2006-07-08 00:08
_V_
Account closed

Registered: Jan 2002
Posts: 124
Graham: Nopes, I have used the fact that this is an infinite series in order to *obtain* the equivalence, because extracting terms the way I did still yields the same series and thus I can complete the calculation. If the series were finite, the equivalence would never be possible as there wouldn't be *enough* terms. As you reject infinity, you can't do my calculation and thus not obtain the result. All you can do is get as close as possible for some resolution and settle for that, while I *am* there and get the exact result immediately. You probably dislike infinitesimals too - dang those integrals and differentials. Or functions in general, which exist in an infinite-dimensional (Hilbert) space, the workspace of quantum mechanics. Or projective geometry, which introduces the "line at infinity". Bahh, outdated stuff, all of it :).

Anyway, we're in an interpretation war here, one which neither of us can win because only time will tell which interpretation will become more popular. Finitism versus, ehh, infinitism. I extend the real number set with +Inf, -Inf and calculate stuff with them as if they were numbers, you will seek ways to avoid this. Finding a way around it is harder, but not impossible. Just think about Dirac, who introduced the Dirac Delta function and bra/ket notation in quantum mechanics, and von Neumann disliking Dirac's "intuitive" ideas to such a point that he invented spectral analysis (one of the most infuriating theories *ever made* - I remember even the strongest maths students sweating hard when this theory was given) just to prove a point :).

In the end, both viewpoints have been proven to complement eachother extremely well. However, Dirac's work is the more user-friendly one, so guess which is the most popular choice? Same criterion for Copenhagen vs Many Worlds. Or Heisenberg's elegant matrix theory vs Schrödinger's godawful wave function.

You know, I will find you at X and we'll discuss this to no avail a little more. WVL, be sure to keep us apart when the c64s start flying around ;). I don't think we have to burden the thread with this ping pong match any longer.
2006-07-08 03:20
Graham
Account closed

Registered: Dec 2002
Posts: 990
You still used equivalence and not infinity. You didn't use the series to calculate 2 but another formula.

This is also the reason why there is an arrow towards infinity and not some equal-to-infinity stuff. The series cannot be infinite, infinity does not exist.
2006-07-08 09:22
WVL

Registered: Mar 2002
Posts: 886
Quote: Graham: Nopes, I have used the fact that this is an infinite series in order to *obtain* the equivalence, because extracting terms the way I did still yields the same series and thus I can complete the calculation. If the series were finite, the equivalence would never be possible as there wouldn't be *enough* terms. As you reject infinity, you can't do my calculation and thus not obtain the result. All you can do is get as close as possible for some resolution and settle for that, while I *am* there and get the exact result immediately. You probably dislike infinitesimals too - dang those integrals and differentials. Or functions in general, which exist in an infinite-dimensional (Hilbert) space, the workspace of quantum mechanics. Or projective geometry, which introduces the "line at infinity". Bahh, outdated stuff, all of it :).

Anyway, we're in an interpretation war here, one which neither of us can win because only time will tell which interpretation will become more popular. Finitism versus, ehh, infinitism. I extend the real number set with +Inf, -Inf and calculate stuff with them as if they were numbers, you will seek ways to avoid this. Finding a way around it is harder, but not impossible. Just think about Dirac, who introduced the Dirac Delta function and bra/ket notation in quantum mechanics, and von Neumann disliking Dirac's "intuitive" ideas to such a point that he invented spectral analysis (one of the most infuriating theories *ever made* - I remember even the strongest maths students sweating hard when this theory was given) just to prove a point :).

In the end, both viewpoints have been proven to complement eachother extremely well. However, Dirac's work is the more user-friendly one, so guess which is the most popular choice? Same criterion for Copenhagen vs Many Worlds. Or Heisenberg's elegant matrix theory vs Schrödinger's godawful wave function.

You know, I will find you at X and we'll discuss this to no avail a little more. WVL, be sure to keep us apart when the c64s start flying around ;). I don't think we have to burden the thread with this ping pong match any longer.


keep you guys apart? :) I don't have a problem with a chickfight at X ;)
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
LightSide
iceout/Avatar/HF
Guests online: 122
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 50 Years of Flex  (9.7)
5 Coma Light 13  (9.7)
6 Edge of Disgrace  (9.6)
7 Comaland 100%  (9.6)
8 Uncensored  (9.6)
9 No Bounds  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.7)
2 It's More Fun to Com..  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Censor Design  (9.3)
4 Crest  (9.3)
5 Performers  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.044 sec.