flat assembler
Message board for the users of flat assembler.

Index > Heap > Numerical oddities

Goto page Previous  1, 2, 3, 4, 5 ... 24, 25, 26  Next
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
As you will see, the end result of the following equation can not possibly be correct. You must tell me where the error in the working has occurred and how it can be made correct.
Code:
                               1 = 1

                               x = 1

                               x = x

                             x-1 = x-1

                          x(x-1) = x(x-1)

                          x(x-1) =-x

                          x(x-1) =-1

                          x(x-1) = (x+1)(x-1)

                          x(x-1)   (x+1)(x-1)
                          ------ = ----------
                           (x-1)        (x-1)

                               x = x+1

                               1 = 1+1

                               1 = 2    
As usual there will be a small prize of one glorious star to the first person the give the correct answer.
Post 18 Oct 2008, 09:17
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
I'm not giving away the answer early, the others should get the chance. Wink
Post 18 Oct 2008, 09:42
View user's profile Send private message Visit poster's website Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
hehe this problem is so old, the problem is the division by 0 in the (x-1) denominator Razz

(also replacing x with 1 only in a part, at line 7 (from 1) Smile)

_________________
Previously known as The_Grey_Beast
Post 18 Oct 2008, 12:08
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
Borsuc: You are half way to answering the puzzle. If you wish to earn the prestigious prize then you need to fulfil all the requirements: "how it can be made correct".

BTW: I think there is nothing wrong with line 7!
Post 18 Oct 2008, 12:18
View user's profile Send private message Visit poster's website Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
no sorry i meant that line 7 is sneaky because it already assumes x=1 (which was the original assumption) but then you divide by x-1, which is 0 under that assumption, so it makes it obvious Smile

How to solve it? Maybe not divide by 0? Question I dunno sorry so I guess the prize is not mine Razz

_________________
Previously known as The_Grey_Beast
Post 18 Oct 2008, 13:41
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
Well nobody solved the previous problem, but no matter I will give you all a second chance with this one. As before, you will see the end result of the following equation can not possibly be correct. You must tell me where the error in the working has occurred.
Code:
                        e^(i*pi) + 1 = 0         ;Euler's identity

                            e^(i*pi) = -1

                         (e^(i*pi))² = (-1)²

                          e^(2*i*pi) = 1

                          e^(2*i*pi) = e^0

                      ln(e^(2*i*pi)) = ln(e^0)

                              2*i*pi = 0

                       2*i*pi/(i*pi) = 0/(i*pi)

                                   2 = 0    
There will be a small prize of one glorious star to the first person the give the correct answer.
Post 29 Oct 2008, 13:07
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
I think that error is here:
Code:
                      ln(e^(2*i*pi)) = ln(e^0)

                              2*i*pi = 0    
You can't apply logarithm defined for the real numbers on the left side of the first equation because you get a complex exponent.

[EDIT]
Code:
ln(e^(i*x)) = i(x+2*k*pi)    
where k belongs to the set of the integer numbers. Hence
Code:
ln(e^(i*2*pi)) = i(2*pi + 2*k*pi)
ln(e^(i*2*pi)) = i*2*(k+1)*pi    
From the other hand
Code:
ln(e^0) = ln(e^(0*i)) = i(0 + 2*k*pi) = i*2*k*pi    
Sets of the complex numbers {i*2*(k+1)*pi; k in Z} and {i*2*k*pi; k in Z} are equal, hence we can write
Code:
ln(e^(i*2*pi)) = ln(e^0)
i*2*k*pi = i*2*k*pi    
for every integer k.


Last edited by MHajduk on 29 Oct 2008, 16:06; edited 1 time in total
Post 29 Oct 2008, 15:38
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
MHajduk wrote:
I think that error is here:
Code:
                      ln(e^(2*i*pi)) = ln(e^0)

                              2*i*pi = 0    
You can't apply logarithm defined for the real numbers on the left side of the first equation because you get a complex exponent. You have to apply here complex logarithm which will be equal here 0 not 2*i*pi.
I accept your answer. An explanation can be found here.

Here is your prize: *

Congrats. You now join the rare club of prize winners here on the fasm board.
Post 29 Oct 2008, 15:54
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
Yes, I've completed my answer above (and hope that it's correct). Wink
Post 29 Oct 2008, 16:08
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
Very nice work.
Post 29 Oct 2008, 16:14
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Will be the answer of the previous contest revealed?
Post 29 Oct 2008, 17:00
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
LocoDelAssembly wrote:
Will be the answer of the previous contest revealed?
Patience. All in good time. I'll leave it for a while to let people ponder over it. But I do promise to give the answer if becomes clear that everyone is either completely stumped or completely bored with it.
Post 29 Oct 2008, 18:08
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
same error with less lines:

x + 1 = 0
x = -1
x² = (-1)² <--------- error is there, it must be -(1)²
x² = 1
x = 1

1 + 1 = 0
Post 29 Oct 2008, 18:19
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
edfed wrote:
same error with less lines:

x + 1 = 0
x = -1
x² = (-1)² <--------- error is there, it must be -(1)²
x² = 1
x = 1

1 + 1 = 0
Nope, the error is two lines below:
Code:
x + 1  = 0
x = -1= (-1)²
x² = 1
x = ±1  <---- must always allow for negative roots.    
Post 29 Oct 2008, 18:23
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
just look a little:

apose ² or a sqr on a sign for equaiton resolution is not recommended, it is not reversible.

sqr 1 = ±1

there start the choice + or - ? it become physical.
Post 29 Oct 2008, 18:43
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
When you have roots it is the case that none, or one, or both of the roots will solve the equation. You must test each of the roots to see which one(s) (if any) will solve it properly.
Post 29 Oct 2008, 19:11
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
revolution,

Why decimal number is divisible by 2 iff it's last digit divisible by 2, but for 4 you have to test two last digits? Wink
Post 07 Nov 2008, 16:08
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
baldr wrote:
Why decimal number is divisible by 2 iff it's last digit divisible by 2, but for 4 you have to test two last digits? Wink

Because 10 is not divisible by 4, but 100 is.
Post 07 Nov 2008, 16:18
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
Tomasz Grysztar,

Whoa, fast reply. Wink Somewhere in my archives I have an essay about divisibility in different radices from Z. Surely I have to extend for Q, R and C domains…
Post 07 Nov 2008, 16:26
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
Well, my primary interest are the Q_p fields - don't forget about them. Wink
Post 07 Nov 2008, 16:28
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4, 5 ... 24, 25, 26  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.