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
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
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(x-1) = x²-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.
18 Oct 2008, 09:17
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.
18 Oct 2008, 09:42
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

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

_________________
Previously known as The_Grey_Beast
18 Oct 2008, 12:08
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
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!
18 Oct 2008, 12:18
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

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

_________________
Previously known as The_Grey_Beast
18 Oct 2008, 13:41
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
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.
29 Oct 2008, 13:07
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
29 Oct 2008, 15:38
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
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.

Congrats. You now join the rare club of prize winners here on the fasm board.
29 Oct 2008, 15:54
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
Yes, I've completed my answer above (and hope that it's correct).
29 Oct 2008, 16:08
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
revolution
Very nice work.
29 Oct 2008, 16:14
LocoDelAssembly

Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Will be the answer of the previous contest revealed?
29 Oct 2008, 17:00
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
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.
29 Oct 2008, 18:08
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
29 Oct 2008, 18:19
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
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
x² = (-1)²
x² = 1
x = ±1  <---- must always allow for negative roots.    ```
29 Oct 2008, 18:23
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.
29 Oct 2008, 18:43
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
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.
29 Oct 2008, 19:11
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?
07 Nov 2008, 16:08
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?

Because 10 is not divisible by 4, but 100 is.
07 Nov 2008, 16:18
baldr

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

Whoa, fast reply. 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…
07 Nov 2008, 16:26
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.
07 Nov 2008, 16:28
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

 Jump to: Select a forum Official----------------AssemblyPeripheria General----------------MainDOSWindowsLinuxUnixMenuetOS Specific----------------MacroinstructionsCompiler InternalsIDE DevelopmentOS ConstructionNon-x86 architecturesHigh Level LanguagesProgramming Language DesignProjects and IdeasExamples and Tutorials Other----------------FeedbackHeapTest Area
Goto page Previous  1, 2, 3, 4, 5 ... 24, 25, 26  Next

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou can attach files in this forumYou can download files in this forum