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
2006-06-29 06:19
A Life in Hell
Account closed

Registered: May 2002
Posts: 204
Quote: 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


The answer is, as always, a lookup table :)
2006-06-29 07:58
Compyx

Registered: Jan 2005
Posts: 631
Quote: The answer is, as always, a lookup table :)

And some logic to go with that, as a lookup-table for 16-bit fixed point numbers would be 65536 bytes, which looks an awful lot like the total memory available on a C64 :)

Look at this page: http://en.wikipedia.org/wiki/Methods_of_computing_square_roots for some information on how to approximate the square root of an arbitrary number. Some parts of the equations can be implemented as lookup-tables, other parts you'll have to implement as code.

I've done these things in the past, don't remember how I did them though, as it was a long time ago I did any 'serious' mathematics in assembly.



2006-06-29 08:25
WVL

Registered: Mar 2002
Posts: 886
Actually I do somewhat the same in pinball dreams to calculate the total speed of the ball : v=sqrt(vx^2+vy^2), now because i wanted a very high resolution, i couldnt use a lookup table.

Good thing for me was that i knew the angle vx and vy made, so i used that as a basis for my calculation (I also have a very convenient and easy way to calculate this angle!).

then you have the following equations that hold :

sin(angle)=vy/v and cos(angle)=vx/v

or, written out for v :

v=vy/sin(angle) or v=vx/cos(angle)

now, sin and cos are interesting, because they're max 1. So i can rewrite this like

v=vy*(1/sin(angle)=vy*((1/(sin(angle))-1)+vy

now, if i make use of only 45' where sin is between sqrt(2)/2 (say .5) and 1 , this means that 1/sin(angle) is between 1 and 2 and (1/sin(angle))-1 is between 0 and 1!!

So i simply have a 1 byte lookup table (0bits.8bits) with the value of (1/sin(angle))-1 and do the calculation using a simple multiplication! :) My table only has to be 32 bytes long (256 makes a complete circle, 64 makes one quarter and i only need half of that).

(you have to use 1/cos(angle)-1 if you're in the other 45' ofcourse, but you can use the same table).

I hope this helps :)

Anyway, if you need to know this for 3d vectors, I'm guessing you're approaching it from the wrong direction and you seriously need to investigate doing the calculations using matrices!
2006-06-29 08:35
JackAsser

Registered: Jun 2002
Posts: 1989
@trifox: may I ask why you need to know the length of the vector, perhaps there are otherways. The best optimization is to not do it at all. :D
2006-06-29 08:53
Graham
Account closed

Registered: Dec 2002
Posts: 990
There is a binary method of calculating a square root, if you totally optimize it towards 6502 asm it is almost as fast as a binary divide routine.
2006-06-29 09:01
Trifox
Account closed

Registered: Mar 2006
Posts: 108
thank you, i need i for some kind of billard simulator, and the reason why i want it to is simply to tread collisions of balls correctly ... hmm, if i ever get this done ?!??! i just got cc65 ready to handle some parts of the maths easily, especcially cross product and scalar produkt calculations is too heavy math for me on doing it directly in asm ...
2006-06-29 12:05
enthusi

Registered: May 2004
Posts: 675
Since you work in C anyway...
Maybe this one?
http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/chap04/sqrt.ht..
For 6502 it might be rather slow though but you can chose an accuracy rather simple...
This method can also be quickened quite significantly by using tables (oh, surprise).
2006-06-29 14:31
PopMilo

Registered: Mar 2004
Posts: 145
Here is one way to do it from

http://www.geocities.com/oneelkruns/asm1step.html

Returns the 8-bit square root in $20 of the
16-bit number in $20 (low) and $21 (high). The
remainder is in location $21.

sqrt16 LDY #$01 ; lsby of first odd number = 1
STY $22
DEY
STY $23 ; msby of first odd number (sqrt = 0)
again SEC
LDA $20 ; save remainder in X register
TAX ; subtract odd lo from integer lo
SBC $22
STA $20
LDA $21 ; subtract odd hi from integer hi
SBC $23
STA $21 ; is subtract result negative?
BCC nomore ; no. increment square root
INY
LDA $22 ; calculate next odd number
ADC #$01
STA $22
BCC again
INC $23
JMP again
nomore STY $20 ; all done, store square root
STX $21 ; and remainder
RTS
2006-06-29 15:18
Trifox
Account closed

Registered: Mar 2006
Posts: 108
oh, i found a interresintg routine here:
http://zeus.osix.net/modules/article/?id=770

which should do exactly what i want ... ;)
2006-06-30 04:31
Honesty

Registered: Jan 2003
Posts: 117
There had also been an article in 64ér magazin about this... When still in need i will look up it...

2006-06-30 07:46
Graham
Account closed

Registered: Dec 2002
Posts: 990
GO64 had an article about this by Krill, but the routine he presented was mine. He didn't explain much about the routine and how to get to it since I didn't explain to him. :)

Anyway here comes the explanation: Imagine you wanna have a square root:

R = sqrt(N)

That obviously gives you:

R^2 = N

Since we wanna establish a convergent algo, we simply use this during calculation:

R(n)^2 <= N

R(0) will be 0. To get closer to N we add a third value D to R as long as that formula is true. Since we work with binary computers, this D will be of the kind 2^x (128, 64, 32 etc).

Ok assuming we wanna have the root from a 16 bit number and since the output of a sqrt of max 65535 (highest 16 bit input) is maximum 255.998 we start with a D of 128 and LSR it down to 1. On each iteration we try (R+D)^2 <= N and if that formula is true, we have R=R+D. If not, R stays unmodified. The resulting algo looks like this:

R = 0
D = 128
while (D >= 1)
{
    temp = R+D
    if (temp*temp <= N) then R=T
    D = D/2
}

As you see this algo is very simple and apart from the temp*temp it does not involve any time consuming operation. The D/2 is ofcourse just a single LSR.

Ok but we are not satisfied. One single integer multiplication is too much for our little 6510 so we have to get rid of it.

(end of part 1, part 2 soon)
2006-06-30 08:24
Cruzer

Registered: Dec 2001
Posts: 1048
*holds breath*
2006-06-30 08:27
Graham
Account closed

Registered: Dec 2002
Posts: 990
(part 2)

Ok now we are not satisfied with the mul but how to get rid of it? First you have to see that (R+D)^2 is a simple binomical formula so you can do this:

(R+D)^2 = (R+D)*(R+D) = R*R + 2*R*D + D*D

Still this doesn't look THAT promising but let's try more formula changing:

R*R + 2*R*D + D*D = R*R + D*(2*R + D)

Ok what do we have now? 2*R is easy since it's just a simple ASL in assembler. A multiplication with D is also easy since D is always of the kind 2^x so D*something is equal to ASL something several times. But damnit, there's still that R*R biatch, let's send her to hell by introducing another variable called M:

M(n) <= N - R(n)^2

And since R(0) = 0:

M(0) = N

As you see M(n) is just the difference from N and "current N during algo" which gives us a new way to decide if D should be added to R or not. The only thing we need now is a way to calculate M(n) without calculating R(n)^2. This is a bit messy but it works with these given formulas:

N(n) <= (R(n)+D(n))^2

Given the easy formula transformation from above we have:

N(n) <= R(n)^2 + D(n)*(2*R(n)+D(n))

Just substract R(n)^2 from both sides and get:

N(n) - R(n)^2 <= D(n)*(2*R(n)+D(n))

Now look a few lines above at the M(n) formula. Do you notice something? Exactly, there we have the front part of this formula too so it is proven that:

M(n) <= D(n)*(2*R(n)+D(n))

Time for a party, that R*R is gone! But how do we calculate those M(n)? Quite simple actually:

M(n+1) = M(n) - D(n)*(2*R(n)+D(n))

So we got a completely new algo:

M = N
D = 128
while (D >= 1)
{
    T = D*(2*R+D)
    if (T <= M) then M=M-T : R = R+D
    D = D/2
}

Yeeehaw! R*R is gone, and 2*R is easy (ASL) and D*whatever is easy too (ASL multiple times). To make this clear I change the muls into ASL's:

M = N
D = 128
for n = 7 to 0
{
    T = (R+R+D) ASL n
    if (T <= M) then M=M-T : R = R+D
    D = D LSR 1
}

Wicked! BUT: We are not satisfied because of n-times ASL :)

(end of part 2, part 3 following in the near future)
2006-06-30 09:58
PopMilo

Registered: Mar 2004
Posts: 145
Now isn't it nice to see something new (at least for me... )in math on c64 :) ?
2006-06-30 11:10
TNT
Account closed

Registered: Oct 2004
Posts: 189
While you hold your breath you might want to check out Apple Assemly Line Vol. 7, Issue 2.

http://bobsc5.home.comcast.net/aal/1986/aal8611.html
2006-06-30 12:35
Graham
Account closed

Registered: Dec 2002
Posts: 990
(part 3 of the square root talk)

Ok I stopped at the point where the multiplication was gone but a ASL with varying shift count appeared. That is no problem for big CPU's like 680x0 or x86, but our poor 6510 doesn't like this so that "ASL n" has to leave.

To do that, we don't investigate the math any further but take a look at how the variables behave during iteration of this algo:

R = 0
M = N
D = 128
for n = 7 to 0
{
    T = (R+R+D) ASL n
    if (T <= M) then M=M-T : R = R+D
    D = D LSR 1
}

D, T, M and R now look like this:

D        T                M                R
10000000 0100000000000000 xxxxxxxxxxxxxxxx x0000000
01000000 0x01000000000000 0xxxxxxxxxxxxxxx xx000000
00100000 00xx010000000000 00xxxxxxxxxxxxxx xxx00000
00010000 000xxx0100000000 000xxxxxxxxxxxxx xxxx0000
00001000 0000xxxx01000000 0000xxxxxxxxxxxx xxxxx000
00000100 00000xxxxx010000 00000xxxxxxxxxxx xxxxxx00
00000010 000000xxxxxx0100 000000xxxxxxxxxx xxxxxxx0
00000001 0000000xxxxxxx01 0000000xxxxxxxxx xxxxxxxx

Removing the "ASL n" would completely change the behaviour of T. But also M has to change because otherwise the T <= M compare and M-T math will not work. So if T is not left-shifted, M has to be right-shifted. The result looks like this:

D        T                M                R
10000000 0100000000000000 xxxxxxxxxxxxxxxx x0000000
01000000 x010000000000000 xxxxxxxxxxxxxxx0 xx000000
00100000 xx01000000000000 xxxxxxxxxxxxxx00 xxx00000
00010000 xxx0100000000000 xxxxxxxxxxxxx000 xxxx0000
00001000 xxxx010000000000 xxxxxxxxxxxx0000 xxxxx000
00000100 xxxxx01000000000 xxxxxxxxxxx00000 xxxxxx00
00000010 xxxxxx0100000000 xxxxxxxxxx000000 xxxxxxx0
00000001 xxxxxxx010000000 xxxxxxxxx0000000 xxxxxxxx

So now instead of shifting T we shift M, but the advantage of shifting M is that it's only 1 bit per iteration. Look at the code now:

R = 0
M = N
D = 128
for n = 7 to 0
{
    T = (R+R+D) ASL 7
    if (T <= M) then M=M-T : R = R+D
    M = M ASL 1
    D = D LSR 1
}

Much much better since ASL 7 can be replaced by a single LSR in asm code later. This code is quite useful on 6510 already, BUT ofcourse this is not everything. Wait for part 4 :D

(part 4 soon on this station)
2006-06-30 19:42
Graham
Account closed

Registered: Dec 2002
Posts: 990
(part 4: finally some asm)

Taking a slightly modified version of the last pseudo code:

R = 0
M = N
D = 128
for n = 7 to 0
{
    T = (R ASL 8) OR (D ASL 7)
    if (T <= M) then M=M-T : R = R OR D
    M = M ASL 1
    D = D LSR 1
}

T can now be calculated quite easily. The high byte is simply R OR <some stuff> and the low byte is always 0 except for the last iteration where it is 128. The shifting of D is done via a table and voila, here is some 6510 code:

        LDY #$00    ; R = 0
        LDX #$07
.loop
        TYA
        ORA stab-1,X
        STA THI     ; (R ASL 8) | (D ASL 7)
        LDA MHI
        CMP THI
        BCC .skip1  ; T <= M
        SBC THI
        STA MHI     ; M = M - T
        TYA
        ORA stab,x
        TAY         ; R = R OR D
.skip1
        ASL MLO
        ROL MHI     ; M = M ASL 1
        DEX
        BNE .loop

        ; last iteration

        STY THI
        LDA MLO
        CMP #$80
        LDA MHI
        SBC THI
        BCC .skip2
        INY         ; R = R OR D (D is 1 here)
.skip2
        RTS
stab:   .BYTE $01,$02,$04,$08,$10,$20,$40,$80

I hope I didn't make any mistakes in that routine :)

Input is MLO/MHI for N and output is Y-register for int(sqrt(N)).

(Anyone here who would have guessed that a routine like that calculates a square root?)
2006-06-30 20:44
enthusi

Registered: May 2004
Posts: 675
weird shit for sure :)
Well, maybe there should be some hall of fame for non-intuitive algs :)
2006-07-01 10:40
Cruzer

Registered: Dec 2001
Posts: 1048
wow
2006-07-01 21:44
Burglar

Registered: Dec 2004
Posts: 1033
graham, what do you do in real life? (as in work)
2006-07-01 23:20
Steppe

Registered: Jan 2002
Posts: 1510
Math teacher? :-)
2006-07-02 01:16
_V_
Account closed

Registered: Jan 2002
Posts: 124
Here's a weird lookup table idea:

sqrt(x) = x^(1/2)

so

ln(sqrt(x)) = ln(x^(1/2)) = (1/2)*ln(x)

In other words, to calculate the sqrt of x, I would

1) look up ln(x) in an x/ln(x)-table
2) ROR ln(x)
3) search for the ROR'ed value in the x/ln(x)-table and check which x value corresponds to it
4) print out sqrt(x) :)

Forgive me if this is already featured in one of the linked articles. I also have no idea whether this is fast or not, or if a good x/ln(x) table for this fits into 64k, etc...
2006-07-02 09:55
Cruzer

Registered: Dec 2001
Posts: 1048
Math professor?
2006-07-02 11:51
Graham
Account closed

Registered: Dec 2002
Posts: 990
Heh, math teachers usually don't have too much math skills. I remember a math teacher who said that it was impossible to calculate a sinus and all the small pocket calculators had big lookup tables inside :D

PS. Oh and I noticed a small mistake in the routine. It's input is max. 14 or 15 bits and not full 16 due to some overflow stuff I had not taken into account earlier.
2006-07-02 12:22
Hein

Registered: Apr 2004
Posts: 933
Those teachers don't teach at university, do they?
2006-07-02 13:24
Trifox
Account closed

Registered: Mar 2006
Posts: 108
great suggestions, but what is with my fixed point number ?!?!
can i use this kind of algo on a 16 bit number and treat the result as a fixed point 8bit.8bit float value ? i think that would be faar too easy ... ;(
2006-07-02 13:50
Graham
Account closed

Registered: Dec 2002
Posts: 990
Fixed point is pretty simple: Just increase iteration count and extend all the variables to fixed point. Currently D counts from 2^7 to 2^0 but you can continue with 2^(-1) etc. Not a problem.
2006-07-03 08:37
Monte Carlos

Registered: Jun 2004
Posts: 351
@trifox
look in the user contributions section of the cc65 homepage.
there should be a file sqrtv1.0.zip
i wrote this after the last csdb discussion about calculating sqareroots. Perhaps it helps

Monte Carlos
2006-07-03 10:04
Graham
Account closed

Registered: Dec 2002
Posts: 990
Ok guys, I finally tested the routine I did up there. Like said before, it only allows 14 bit input ($0000 to $41FF to be more accurate). The reason for this is that M needs one more bit. Ok, some people might want full 16 bit so here is a fixed routine which only has 3 opcodes more:

        LDY #$00    ; R = 0
        LDX #$07
        CLC         ; clear bit 16 of M
.loop
        TYA
        ORA stab-1,X
        STA THI     ; (R ASL 8) | (D ASL 7)
        LDA MHI
        BCS .skip0  ; M >= 65536? then T <= M is always true
        CMP THI
        BCC .skip1  ; T <= M
.skip0
        SBC THI
        STA MHI     ; M = M - T
        TYA
        ORA stab,x
        TAY         ; R = R OR D
.skip1
        ASL MLO
        ROL MHI     ; M = M ASL 1
        DEX
        BNE .loop

        ; last iteration

        BCS .skip2
        STY THI
        LDA MLO
        CMP #$80
        LDA MHI
        SBC THI
        BCC .skip3
.skip2
        INY         ; R = R OR D (D is 1 here)
.skip3
        RTS
stab:   .BYTE $01,$02,$04,$08,$10,$20,$40,$80

This routine works perfectly for all values from $0000 to $FFFF. It even works better than BASIC V2 math which for example fails at INT(SQR(X)) sometimes :)

In fact, my small BASIC program which was supposed to test the assembler sqrt routine failed at value 26569. It returned 162 there although 163*163 = 26569, so it said that my asm routine had failed although it was the BASIC V2 math routines which had failed :D
2006-07-03 10:40
enthusi

Registered: May 2004
Posts: 675
maybe someone can sue MS for that
2006-07-03 12:39
_V_
Account closed

Registered: Jan 2002
Posts: 124
Theoretically speaking, that math teacher wasn't completely wrong when he said you can't really calculate sines. Of course, results like sin 0° = 0 are easy and exact, but some sines are irrational numbers (sin 45°, for example), which - using methods currently known - would take forever to determine exactly. So we settle for rational approximations which usually are sufficient for all intents and purposes.

By the way, if you just enter ?SQR(26569), the V2 basic routine gives 162.999976. The INT routine seems to act like a floor function in that it just throws away the decimal part of the result. Maybe it's better to adapt the test routine so that it rounds numbers up or down - for example

1 INPUT Q : REM Q > 0
2 S = SQR(Q) : I = INT(S) : D = S - I
3 IF (D < 0.5) THEN (A = I) : GOTO 5
4 A = I + 1
5 PRINT A

?
2006-07-03 13:51
JackAsser

Registered: Jun 2002
Posts: 1989
ROUND(x) == FLOOR(x+0.5) == INT(x+0.5), given x>=0 FYI.

This is also important when using fix point for example. Consider using a 8.8 value for expressing an y-coord, then to convert it into actual screen coords I've seen many examples of a simple truncation of the LSB-part. Always add by half before truncation, i.e. y'=HI(y+$0080) otherwise you introduce a 0.5 bit error which will in some cases result in jerky and jumpy motion.

@Graham: Nice work! I'm impressed. :)
2006-07-03 15:28
Graham
Account closed

Registered: Dec 2002
Posts: 990
@JackAsser: Rounding is not correct here since the assembler routine also gives INT(SQR(X)) and not INT(SQR(X)+0.5).

@_V_: You can calculate it as long as you don't have intermediate numbers, for example: (SIN(45°)^2) = 0.5 :)

Well and the math teacher said that pocket calculators used tables for calculation. That's definitely wrong, imagine that he said that in the 80s when a few KB was not only expensive but also biiiig :)
2006-07-03 16:14
_V_
Account closed

Registered: Jan 2002
Posts: 124
Graham: You calculated sin^2(45°), not sin(45°), which is a different number. Sin(45°) is equal to sqr(2)/2. Since sqr(2) is an irrational number, sin(45°) cannot be equal to a decimal fraction or bit pattern of any kind, it can only be approached by one. The best we can do with irrational numbers is to represent them with a symbol (e, for example) or extract them from properties wherein they appear (for example, the ratio of the surface of a perfect disc and the squared radius of said disc is exactly equal to pi). In other words, we use them in an indirect way so that we don't have to use their mindboggling explicit form.

Yes, you can use a currently known algorithm to calculate sin(45°)... but only up to a certain degree of precision. If you want to determine the entire number, its real value, you'll need an infinite amount of time to do so. That's why I said that you can't *really* calculate them with such methods.

As for the 80s maths teacher and the table, he might have meant a table containing certain power series (Taylor, Lagrange, etc.) expansion coefficients which the calculator could use to calculate f(x) for a given x and f, using for example a formula like f(x) = a0+a1*x+a2*x^2+... Such a table would be small enough to fit into the calculators of that era, I reckon. If he was talking about storing the huge books filled with log-tables and stuff inside them, then no indeed :).
2006-07-03 16:32
Graham
Account closed

Registered: Dec 2002
Posts: 990
No I was talking about keeping "SIN(45°)" as representation of SIN(45°), you don't always need decimals :)
2006-07-03 22:44
_V_
Account closed

Registered: Jan 2002
Posts: 124
Yep, but at some point, in some formula, you'll need the numerical value of sin(45°), because it's explicitly stated in the result. And then, you'll find that you cannot calculate it exactly with the current methods, unless you're willing to wait forever :).
2006-07-04 06:59
JackAsser

Registered: Jun 2002
Posts: 1989
Question is, why do you WANT the numerical exact representation. To apply it in the real world? I don't think so, at some point you'll get down to the quant angle, quant time, quant length, quant ***. So, one could argue that more decimals in PI than f.e. 1000 is irrelevant in the numerical form since they're not applicable on anything. :D And if you need that many decimals to avoid summing up rounding errors I suggest using another method than the numerical representation in the first place.
2006-07-04 10:44
enthusi

Registered: May 2004
Posts: 675
this is somewhat off topic here :) but euler's 'e' is for example very much needed with greater precision than 1000 decimals since there are massive iterative computations 'using' it. Actually there is the legend about an error in 1000th place that caused the first examination of 'chaotic' behavior.
Since sin is periodic and almost always associated with geometry, I would know of no use for superprecision (well that is not the reason for my lack of knowledge but you get what I mean).
@_v_: waiting for ever wont give you the result either

in general: don't defend math teachers - they tend to know shit :) But I too thought they use small coefficent tables for some calcs - like the kernal does :)

2006-07-04 11:15
Graham
Account closed

Registered: Dec 2002
Posts: 990
Here's an extended incarnation of the integer sqrt routine. This one is extended so it does proper rounding. It is achieved by adding another iteration and calculate bit -1 which then can be used to determine if the fractional part is >= .5 or not.

The disadvantage of rounding is that the output has to be 9 bits now, because inputs $FF01 to $FFFF result in 256 now (and not 255). Alternatively you also might modify this routine and simply use bit -1 for further calculations. This gives you more accuracy than rounding.

        LDY #$00    ; R = 0
        LDX #$07
        CLC         ; clear bit 16 of M
.loop
        TYA
        ORA stab-1,X
        STA THI     ; (R ASL 8) | (D ASL 7)
        LDA MHI
        BCS .skip0  ; M >= 65536? then T <= M is always true
        CMP THI
        BCC .skip1  ; T <= M
.skip0
        SBC THI
        STA MHI     ; M = M - T
        TYA
        ORA stab,x
        TAY         ; R = R OR D
.skip1
        ASL MLO
        ROL MHI     ; M = M ASL 1
        DEX
        BNE .loop

        ; bit 0 iteration

        STY THI
        LDX MLO
        LDA MHI
        BCS .skip2
        CPX #$80
        SBC THI
        BCC .skip3
.skip2
        TXA
        SBC #$80
        TAX
        LDA MHI
        SBC THI
        STA MHI
        INY         ; R = R OR D (D is 1 here)
.skip3
        CPX #$80
        ROL MHI

        ; bit -1 iteration and rounding ( + 0.5)

        LDX #$00
        BCS .skip4
        CPY MHI
        BCS .skip5
.skip4
        INY         ; R = R + 0.5
        BNE .skip5
        INX
.skip5
        ; R in X and Y (Y is low-byte)

        RTS
stab:   .BYTE $01,$02,$04,$08,$10,$20,$40,$80

If you don't wanna have the rounding and prefer having bit -1, then use this final iteration:

        ; bit -1 iteration

        BCS .skip4
        LDX #$00
        CPY MHI
        BCS .skip5
.skip4
        LDX #$80
.skip5
        ; R in Y, X contains bit -1

        RTS
2006-07-05 19:59
_V_
Account closed

Registered: Jan 2002
Posts: 124
@Jackasser: I was speaking theoretically, at the moment, there is no apparent need for super-precision. Hence my prior statement, "So we settle for rational approximations which usually are sufficient for all intents and purposes". However, this may very well change in the future - there may also be procedures which only have superslow convergence, or systems of differential equations which require superprecision in order to not blow up after 2 iterations.

Quantum theory might not be the end-all of everything. Therefore, I would wait before declaring that the universe is just a collection of discrete spaces of quantum dimensions in which elementary particles hop and do their thing, and that only a limited amount of precision is all you need.

@enthusi: No, when you wait infinitely long, i.e. when you take the limit t->+Inf, you will have the exact decimal representation of the number (as decimals are countable). Remember, "infinity" is a weird thing. And, I have to defend maths teachers because I am one (actually physics, but I've given maths for a couple of years and I did have the impression that I knew what I was talking about).
2006-07-05 20:06
Tch
Account closed

Registered: Sep 2004
Posts: 512
"Don´t think too much about things,it will influence the outcome.
Thus there is no absolute truth."

Sorry,read this somewhere and I couldn´t resist. ;)
2006-07-05 21:49
Graham
Account closed

Registered: Dec 2002
Posts: 990
Quantum theory stays assumed right until somebody proves it wrong. That's the way of science.

Anyway, talking about "infinitely long" or "unlimited decimals" makes me oppose. There is no such timepoint called "infinity". Every point-of-time you can come up with is still a pretty finite point-of-time and the same applies to decimals. Every decimal number you can write down is a decimal with limited length, or else it is no decimal anymore. (Infinity might be weird, but unboundedness is not. And only the 2nd one exists.)
2006-07-06 03:46
chatGPZ

Registered: Dec 2001
Posts: 11136
i think we should point monk at this thread.
2006-07-06 09:04
enthusi

Registered: May 2004
Posts: 675
I agree with me and graham here :)
If you wait infinitely long, well you do wait infinitely long.
No 'result' ever :)

Edit: Oh, I agree with groepaz too
2006-07-06 11:03
Copyfault

Registered: Dec 2001
Posts: 466
Speaking of math and infinity...

Some fields medalist (this is a mathmatician with some kind of noble price) once said that there is no characteristic 0 in the real world, but rather a finite characteristic within the number fields we use for calc'ing things...

might be if we take a big enough prime ;))
2006-07-06 12:31
Cruzer

Registered: Dec 2001
Posts: 1048
As far as I know, noone has ever been able to come up with a proper definition for numbers, (i.e. what is 0 and 1, etc.), so they probably don't even exist in the real world.
2006-07-06 13:06
enthusi

Registered: May 2004
Posts: 675
yeah, like love <3
2006-07-06 14:33
Copyfault

Registered: Dec 2001
Posts: 466
@Cruzer: there are Peano's axioms which give us a good start at least for a definition of a set we usually refer to as "natural numbers". The funny thing about it is that even today there are some mathmaticians who consider the element "0" to be part of \N, whereas others do not!

So you're not that wrong when saying there's no proper def;)) Btw, isn't all pure math disjoint to the real world?
2006-07-06 14:47
Graham
Account closed

Registered: Dec 2002
Posts: 990
Well if you make something like numbers up, they "exist". You can easily come up with lot's of different axioms which are all equally right. The only thing which is leading us to the current axioms used for math is the optimizations towards an orthogonal math with as few as possible extra rules for operations.
2006-07-06 14:58
Cruzer

Registered: Dec 2001
Posts: 1048
Isn't the problem with axioms that it's basically assumptions. So when you build something on a foundation of axioms, the whole validity of what you build up relies on assumptions. And since math is built on axioms like "we assume that there is something called 0 and 1" which noone can define, it's just assumed that they exist, then the validity of math itself cannot be proven.

Or maybe I'm just making up excuses why I had so low math grades in school. :)
2006-07-06 15:05
enthusi

Registered: May 2004
Posts: 675
Doesnt matter where you put 0.
Well, thats not due to impotence but just a matter of convention.
And nothing is or ever will be more precise than math. The only true selfconsistent philosophy you will find.
Its flawless in itself ;)
And the axioms needed are pretty basic and less than one might think.
"basic" as in what people like to call 'obvious'.
Of all things you cant question math :)
And second least questionable is physics btw :)
And both are on top of every critics list for some strange reason.

edit:
and before someone claims that it can be questioned: sure, but nothing is less questionable. Even the assumption that you exist leads to more open ends and inconsistencies than math.
2006-07-06 15:27
Trifox
Account closed

Registered: Mar 2006
Posts: 108
0 is the neutral element of addition, where 1 is the neutral element of multiplikation ... both operators together form a nice body ... :)
2006-07-06 17:17
Monte Carlos

Registered: Jun 2004
Posts: 351
Hey, the sun is nice outside !

Monte
2006-07-06 18:07
Copyfault

Registered: Dec 2001
Posts: 466
@enthusi: wonder if all axioms in math are really "obvious" as you put it...

someone at the university once said: "in math there's only 'if-then'-phrases"; and he was f**king right!

What's really interesting about math is its consequences for the real world, that it _can_ be misused as a language to predict certain things (mostly values, that is;)) Ofcourse this comes from the chosen axioms, as they are mostly inspired by problems in ancient physics. So "inspired by the inner workings of nature" might be a good phrase to describe the character of math axioms...

But let's better watch the sun outside - it gives less headache;))
2006-07-06 18:54
JackAsser

Registered: Jun 2002
Posts: 1989
axiom = atomic (as in non-dividable ;) ) assumption imo.

Also don't forget Gödel's incompletness theorem which actually proves that based on the axioms in a closed system there will be equations/formulations/explanations/theses that are true but in-provable. Getting really wacked here I'm thinking of applying that theorem to universe itself. Imagine physics one day finds all the "axioms" in nature, that would direcly mean that the will be stuff in universe that are true, but still not provable. Such as the creation, where it came from etc. Stuff like that could very well be inprovable but still very true if you consider Gödel's theorem on universal scale. (perhaps). :D

ps. This are getting really out of topic now and I think it's just a way for us "others" to try to make a point or catch some of Graham's brilliant glow with his algorithm. Actually only Graham have stayed in topic and actually delivered more that just crap talk. :D </asslicking & appreciation>
2006-07-06 19:06
_V_
Account closed

Registered: Jan 2002
Posts: 124
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?
2006-07-06 22:31
Cruzer

Registered: Dec 2001
Posts: 1048
Talking about off-topic, how about interpretation of quantum mechanics anyone? :o)

I'm mostly in favor of the Many Worlds Interpretation, even though I live in Copenhagen.
2006-07-07 05:17
chatGPZ

Registered: Dec 2001
Posts: 11136
MOOOONK! WHERE ARE YOU?!
2006-07-07 06:40
Spinball

Registered: Sep 2002
Posts: 87
Quote: Talking about off-topic, how about interpretation of quantum mechanics anyone? :o)

I'm mostly in favor of the Many Worlds Interpretation, even though I live in Copenhagen.


"I cannot believe that God plays dice with the cosmos."
2006-07-07 07:48
Graham
Account closed

Registered: Dec 2002
Posts: 990
@Cruzer: I also favor the many worlds stuff. Once I saw some prof dude explain that the super-states of quantums can be interpreted as interference between two worlds which are very close to each other.

Btw, I did the 16.0 bits -> 8.8 bits square root routine, but it's untested yet. Since the routine is more than twice as big as those routines up here, I think testing is needed :D
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 ;)
2006-07-08 13:13
_V_
Account closed

Registered: Jan 2002
Posts: 124
Graham: (pong)

>You still used equivalence and not infinity. You didn't
>use the series to calculate 2 but another formula.

I *did* use infinity because if I hadn't used the fact that the series has an infinite amount of terms, then I wouldn't have obtained the equivalence and hence the result. You can't see it due to the power of notation, but it's there.

>This is also the reason why there is an arrow towards
>infinity and not some equal-to-infinity stuff.

Uh, no, the arrow has nothing to do with the existence of an element. Because then I could also argue that 4 doesn't exist because I can write stuff like lim (n->4) 1/n. "Look, there's an arrow pointing at 4, thus 4 doesn't exist."

>The series cannot be infinite, infinity does not exist.

Okay. That is your viewpoint as a finitist. I have mine as an "infinitist". Now if you want to make me a believer, then prove formally that the element "infinity" doesn't exist. And don't do it just for me, because if you can really show this, then you will change the face of mathematics forever. Things like measure theory (which lead to integrals), Hilbert space (and thus quantum mechanics), projective geometry, statistics, fractals and extended number spaces will become entirely obsolete.
2006-07-08 15:53
Copyfault

Registered: Dec 2001
Posts: 466
It's funny to read these ping-pong-posts from "the finitist" Graham and "the infinitist" _V_.

I somehow have the feeling that "math" has a different meaning for you two. While Graham seems to argue like an "applied scientist", _V_ seems to be the "pure mathmatician". What were you two guys doing irl ;) ?

In applied science, infinity is rather a concept than some "serious element" of whatever set. A term like

lim_{n -> +inf} f(n) = g

more or less means "ok, the bigger n is chosen, the smaller the difference between my calculations and the desired value g will be". At least this is what I was told during all my physics_stuff at the university, and, this is absolutely alright irl! And it will stay that way as long as no "infinitesimal precise" measurements can be done, which is a real problem if we take quantum mechanics for granted!

In "pure math", things turn out to be slightly different;) There is no prob in defining an element called "infinity" if the definition is coherent with the setting in which we're willing to define it! For mathmaticians, such socalled "welldefined" objects exist. There are even examples for proofs that show existance of some objects without being constructive! For me, I have to admit, is this the beautiful part of math;))

Looking forward to seeing more ping-pongs from you - damn it I'll for sure won't make it to X this year:/

CF
2006-07-08 17:20
Graham
Account closed

Registered: Dec 2002
Posts: 990
Computer science is kinda the "extension of math" and it also has to deal with infinity. A lot of problems can be proven unsolvable because of infinity.

Anyway my point was: You do not actually use infinity to calculate something because you can't.
2006-07-09 16:25
enthusi

Registered: May 2004
Posts: 675
V:
inf (again/still) is no value.
Whenever you have an equation with inf in it, its bogus.
You can 'imagine' (not compute) what the limes of something towards inf would be and then use that expression *instead* and get a result (as you did above).
And especially mathematicians (those I dealt with for quite some time :) are very very careful about limes-stuff.
Actually they hate it :)
It is merely a concept - a necessary one of course to connect things we can describe and things that exist.
A circle can be described with some lim/inf-stuff but you can not compute it that way. Just as you cant compute pi - even if you have an unlimited amount of time :)
All the integral-stuff you mentioned is applied to concepts, not to calculations.
You do not calc inf no of steps. Instead you show that you get from a to b via the concept of lim/inf and THEN you calc b, since it now is freed of inf.
As graham explained, you didnt compute the result using inf, but converted/transformed it instead.
I too claim (but unfortunately Im very much not to first to do so) that infinity does not exist. Not in the world perceptible to us.
2006-07-09 16:44
Graham
Account closed

Registered: Dec 2002
Posts: 990
Also please note that once you do not have an equivalence of something infinite to something finite, you cannot calculate it. There is a huge set of unsolvable/uncalculateable problems due to that.
2006-07-09 18:52
_V_
Account closed

Registered: Jan 2002
Posts: 124
Copyfault is right in pointing out that I have been talking about the element "Infinity" as viewed in pure mathematics. Mathematicians like to extend the real number line with the elements +/-Infinity, as they can then prove it to be isomorphic with the closed interval [0,1] and make the set compact, which is a very attractive property in topology. Apparently, mathematicians are idiots to do this because infinity doesn't exist.

Graham:
>Anyway my point was: You do not actually use infinity to >calculate something because you can't.

Enthusi:
>As graham explained, you didnt compute the result using
>inf, but converted/transformed it instead.

Except that I *did*. I _used Inf_ to _convert_ the expression and obtain the exact result.

1/+Inf = 0

Whoops, I just used Infinity again to calculate something :). And I didn't even write lim anymore. All nicely done in the extended real number line, of course.

>inf (again/still) is no value.
That's why I said that +Inf is a numberless number. It certainly isn't a "real number" like pi, but it still is the element used to extend the reals.

>Whenever you have an equation with inf in it, its bogus.
Quite bogus to say, considering that the majority of physical and mathematical theories are crawling with infinities of all kinds. Hence those theories must be bogus, too?

>You can 'imagine' (not compute) what the limes of
>something towards inf would be and then use that
>expression *instead* and get a result (as you did above).
In my computation, I'm not going towards infinity. I'm already there because I'm dealing with the infinite object, the infinite series itself. By the way, wouldn't you say that imagination/reasoning is a form of computation?

>Just as you cant compute pi - even if you have an
>unlimited amount of time :)
You will have determined pi, or any irrational number, exactly at infinity units of time :).

>And especially mathematicians (those I dealt with for >quite some time :) are very very careful about limes-stuff.
Of course, but from ym experience, I'm quite sure that their concern is mainly focused on the convergence behaviour of the object under scrutiny, not the actual limit per se.

>I too claim (but unfortunately Im very much not to first
>to do so) that infinity does not exist. Not in the world
>perceptible to us.
Whether or not infinity exists in the physical world must still be proven. I'm definitely not going into it. Conceptually, though, it's certainly there.

>Also please note that once you do not have an equivalence
>of something infinite to something finite, you cannot
>calculate it. There is a huge set of
>unsolvable/uncalculateable problems due to that.

That's a statement I'm not going too deeply into either, because this is part of the realm of logical theories and undecidable sentences, which still is a vast, uncharted territory. Suffice to say, I believe that any undecidable problem in one theory can be decidable in another theory. Hence - given that you look hard enough - you can prove/solve/calculate anything, but only within your theory of choice. I believe that everything is relative - even the fabric of mathematics itself.

I'll leave you with a question to think about: does the Sierpinski triangle exist?
2006-07-09 19:19
chatGPZ

Registered: Dec 2001
Posts: 11136
Quote:
I'll leave you with a question to think about: does the Sierpinski triangle exist?


that one is quite an interisting problem :=) go a step further and create a pyramid using the same recursion... and you'll get an object with infinite surface but zero volume... o_O
2006-07-09 19:22
JackAsser

Registered: Jun 2002
Posts: 1989
1/+Inf = 0 is bogus since then 0*(+Inf) = 1 which it clearly isn't... :D

My point is that dealing with +-Inf without the concept of limes is delicate and can easily lead to obscure results as the above.
2006-07-09 19:27
Graham
Account closed

Registered: Dec 2002
Posts: 990
Oh well... Infinity is just a concept and no number. It is not imaginable, only a few rules of how something infinite would behave is imaginable. But applying these rules is not equal to applying infinity.

Oh, and nopes, the Sierpinski Triangle does not exist. Only the rule of how you could build one IF infinity existed. But ofcourse: Infinity does not exist.
2006-07-09 19:50
chatGPZ

Registered: Dec 2001
Posts: 11136
Quote:
Oh, and nopes, the Sierpinski Triangle does not exist. Only the rule of how you could build one IF infinity existed. But ofcourse: Infinity does not exist.


and the sierpinsky "pyramid" demonstrates it quite well... an object with zero volume does not exist :=)
2006-07-09 20:16
JackAsser

Registered: Jun 2002
Posts: 1989
Sierpiensky at infinity goes towards infinite lenght/area/volume (depending on # of dimensions) and goes towards the initial enclosing volume, NOT 0.
2006-07-09 20:23
enthusi

Registered: May 2004
Posts: 675
the Sierpinski "Tetraeder" (a imaginary thing) has the Dimension==2 thus no volume but constant surface.

2006-07-09 20:28
Graham
Account closed

Registered: Dec 2002
Posts: 990
The Sierpinsky triangle has an area of 0 because it has a dimension of less than 2 (D = 1.585) and also the Sierpinsky pyramid (they call it "sponge") has a dimension less than 3 (D = 2) which means volume = 0.
2006-07-10 07:31
Frantic

Registered: Mar 2003
Posts: 1628
Now.. Isn't this the philosophical question about the status of "World 3" (in poppers terms)? Yes, it is...

They even mention infinity in this discussion of it.

http://www.cs.joensuu.fi/~whamalai/skc/popper.html

Just for the sake of it, I'll mention the word "C64" in this post.

So long!
2006-07-10 11:25
Trifox
Account closed

Registered: Mar 2006
Posts: 108
yes, it is funny, the menger sponge has infinity surface, but no volume, i made a nice screensaver about it:
http://download.verpicktewg.de/?filename=fractalmovies/screensa..
2006-07-10 12:05
chatGPZ

Registered: Dec 2001
Posts: 11136
i demand sierpinsky burgers. infinitly tasty but zero calories!
2006-07-11 02:35
_V_
Account closed

Registered: Jan 2002
Posts: 124
Jackasser:
>1/+Inf = 0 is bogus since then 0*(+Inf) = 1 which it >clearly isn't... :D
Nopes, what actually is bogus is the statement 0*(+Inf) which isn't well-defined in the set of extended reals, whereas 1/+Inf is. Reason for this is that the inverse of both +Inf and -Inf is 0, hence the inverse of 0 is undetermined. Limits are one thing, doing arithmetics with extended reals another. Of course, you can also calculate limits within the extended real space.

Graham:
>Oh well... Infinity is just a concept and no number. It is
>not imaginable, only a few rules of how something infinite
>would behave is imaginable. But applying these rules is
>not equal to applying infinity.
Missing is the word "real" in front of the word "number" in the first sentence, but it's getting warm :). Now, it is important that "rules" and "elements" aren't mixed up. On the one hand, you have elements which may or may not constitute a set. It is then possible to define operators (rules) onto these elements which combine them in a certain way. When such an operator is applied to some elements, you are effectively using them. Thus, if one of the elements within the operation happens to be infinity, you are really, truly, honestly "applying infinity". And you will be able to recognise it as well.

This holds true with all numbers. Have you ever seen, heard, smelled, touched or tasted the elements 0, 1, 2/3, pi, etc.? Maybe you've tasted 1 apple, where you used a complex visual recognition process to denote a certain physical set as "apple, 1 in quantity". But 1 itself? Don't think so. 1 is - for the time being - a concept in our heads, an element we can apply operators on, an element we can recognise in our calculations. Just like infinity. Just like "0 volume". In a way, we're using a sort of "maths sense" to "imagine" and "work" with mathematical objects. At the very least, they exist in our heads. They may exist physically as well, but it remains to be seen what that form of existence is.

>Oh, and nopes, the Sierpinski Triangle does not exist.
>Only the rule of how you could build one IF infinity
>existed. But ofcourse: Infinity does not exist.
That's the answer I expected from the finitist. Now the infinitist's viewpoint: within complete metric spaces, the "contractive mapping fixed-point theorem" proves the Sierpinkski Triangle's existence and uniqueness. Feel free to provide a counterproof if you have one. If you have been talking about existing physically, see above.

Frantic:
>Now.. Isn't this the philosophical question about the
>status of "World 3" (in poppers terms)? Yes, it is...
Hmm, that depends, as Popper's expressing a viewpoint which may or may not correlate to the discussion at hand.
2006-07-11 10:34
Copyfault

Registered: Dec 2001
Posts: 466
Thank you for all the details you give in your posts, _V_! I totally share your point of view! Are you working as a mathmatician at some university?

@Graham: No, computer science is definatly NOT an extension of math!!! It's rather the other way around: computers give us the possibility to apply _certain_ concepts that arise in math, but for sure not all of them. I'd tend to say that computer science is something like the "discretifying of math" ;)


CF
2006-07-11 11:29
Graham
Account closed

Registered: Dec 2002
Posts: 990
Let me rephrase: Theoretical computer science is the extension of math.

http://en.wikipedia.org/wiki/Computer_science

(No, computer science is not "C++ programming" or "database adminship")
2006-07-11 12:28
Copyfault

Registered: Dec 2001
Posts: 466
Quote: Let me rephrase: Theoretical computer science is the extension of math.

http://en.wikipedia.org/wiki/Computer_science

(No, computer science is not "C++ programming" or "database adminship")


Let _me_ rephrase: No, it's not! Even this wiki-entry just says that computer science is by some people considered to be among the scientific disciplines with a very close relationship to math, but it's nowwhere told that math is just a "part" of computer science (which would be a lie!).

I must admit I never studied "computer sciences" as a fulltime_job, but I did at least attend _some_ courses. Seen from a mathmaticians point of view all these courses seemed like some funny applications of mathmatical concepts - no more, no less!

But let me also rephrase: I think the notion "math" has different meanings to us (see one of my posts above).


CF
2006-07-11 13:06
Graham
Account closed

Registered: Dec 2002
Posts: 990
Math deals around with lot's of logic and how to compute stuff, computer science extends that by asking about information, complexity and most important: computability.

If you look at computer science courses you will see lot's of math which build the base to lot's to follow. And ofcourse courses on how to apply all of this, after all you study all this to make a living and not levitate above earth on theory.
2006-07-11 15:40
Copyfault

Registered: Dec 2001
Posts: 466
Math is the science of structure. It can ofcourse be applied to other fields in science, mostly to compute things, but it also exists on its own.

If you concentrate on the computational side of math, I can understand what you mean with "extansion of math", but in mathmatics you do slightly more than "computations and dealing around with logic". You try to investigate structures without any necessity of reality.

then again, I guess almost every "pure mathmatician" does not bother about "having to make a living" - until he badly has to ("Hmm, where's this dreamworld of beautiful structures gone? What idiot kicked me out of it??? Help, I guess this is reality" ;) )
2006-07-11 15:56
chatGPZ

Registered: Dec 2001
Posts: 11136
computer science is a form of >>>applied<<< math. and there is no doubt about it :) pure math is more like pure information science, both are in many cases pretty useless for realworld problems :)
2006-07-11 16:38
Graham
Account closed

Registered: Dec 2002
Posts: 990
I think you see "computer science" too much as a computer course which it isn't. Computer science was started long before computers existed, and btw "information science" is computer science aswell. That's why we call it "Informatik" in germany.
2006-07-11 17:08
chatGPZ

Registered: Dec 2001
Posts: 11136
no, i'm not mistaking CS as a programming course, i know it isnt. (and programming has little to do with "informatik"). but there is still a difference between what resembles "applied" math (sth like "technische informatik") which deals with solving real world problems and all the theory mumbowumbo many other parts of math (and CS) relate to. (what i wrote previously is a -admittedly shortened and slightly modified- quote from edsgar dijkstra btw, taken from a simelar discussion about a simelar topic... other nice ones are "Programming is one of the most difficult branches of applied mathematics; the poorer mathematicians had better remain pure mathematicians." and "...the harm was done: the topic became known as "computer science"---which, actually, is like referring to surgery as "knife science"---and it was firmly implanted in people's minds that computing science is about machines and their peripheral equipment." :))
2006-07-12 18:34
Danzig

Registered: Jun 2002
Posts: 429
this is all sooooo *offtopic* :)
2006-07-12 18:35
chatGPZ

Registered: Dec 2001
Posts: 11136
someone call the police!
2006-07-12 19:53
Danzig

Registered: Jun 2002
Posts: 429
you should empty your stiffy pockets before they arrive
2006-07-12 22:30
chatGPZ

Registered: Dec 2001
Posts: 11136
they are as empty as they could be unfortunatly :(
2006-07-13 17:41
Graham
Account closed

Registered: Dec 2002
Posts: 990
Yeps, when will somebody post a sqrt routine... except me :P
2006-07-13 17:55
chatGPZ

Registered: Dec 2001
Posts: 11136
lda table,x


8 bit input is in X, 8 bit output in A

*runs*
2006-07-14 06:33
Monte Carlos

Registered: Jun 2004
Posts: 351
I already posted, where you can look for it ;)

Monte
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
Radd Maxx/SWIM
tlr
nucleus/TempesT
cobbpg
Murphy/Exceed
xahmol
Smasher/F4CG
A3/AFL
digix
Didi/Laxity
Guests online: 159
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

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