flat assembler
Message board for the users of flat assembler.

Index > Heap > Numerical oddities

Goto page Previous  1, 2, 3 ... 14, 15, 16 ... 24, 25, 26  Next
Author
Thread Post new topic Reply to topic
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
It's equations derived from 3 sayings. One from the Bible. I don't know the first, but from it is women = time*money, the second, time equals money, and the third, money is the root of all evil.
Code:
women = money * (time = money)
women = money^2
women = (evil^(1/2))^2
women = evil
    
Post 13 Oct 2010, 05:48
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17271
Location: In your JS exploiting you and your system
revolution
How do you know to use the square root? Maybe money is the infinite-th root of all evil. Then your equation becomes:

women = (evil^(1/∞))^2
women = evil^0
women = 1
Post 13 Oct 2010, 05:57
View user's profile Send private message Visit poster's website Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
i know people/girls hating money - do not calumniate
Post 13 Oct 2010, 06:11
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
0/0 has removable discontinuity. It is an accepted practice to use the value of the limit at the discontinuous function, when useful. An example of this is how we are taught n^0 = 1 and that quadratic functions are of the form ax^2 + bx + c, implying that c is also cx^0, in which case all y-intercept values would be undefined, but we use 1 for the sake of consistency.

A possible way to solve 0/0, is to differentiate f(x) = x, which using power rule, is 1 also. But there is inconsistency when you differentiate other functions like, for example, 2x, when you get a different answer for the same 0/0 (d/dx(2x) = 2).
Post 03 Nov 2010, 01:16
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17271
Location: In your JS exploiting you and your system
revolution
There is a very good reason why x^0=1. It is because it is consistent and doesn't create nonsense results.

There is a very good reason why 0^x=0. It is because it is consistent and doesn't create nonsense results.

However in both of these x cannot be =0 because of the inherent contradiction. Both of these have discontinuities at 0 and thus 0^0 is undefined.

The same goes for x/0 and 0/x. Both are discontinuous at 0 and thus 0/0 is undefined. Of course x/0 is also undefined for all x and is discontinuous everywhere but this doesn't nullify the argument. It is not as simple as merely saying +-x/0 = +-infinity, that also has problems with inconsistent results. Besides infinities are tricky to deal with.

As for sqrt(-1), although uncomputable, it can be used in algebra and still give consistent results.
Post 03 Nov 2010, 01:44
View user's profile Send private message Visit poster's website Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
You separate them more than they really are. How do we define x^n, when n <= 0? We use sum/dif of exponents rule. Therefore, (x^n, n <= 0) = x^1/x^(+n + 1). And in the case x = 0, n = 0, 0^0 = 0^1/0^1 = 0/0. In one statement: 0^0 is 0/0.

EDIT: I never said x/0 was ∞. Most get that argument from x/x -> ∞, as x -> 0+, but the truth is that x/x has no limit b/c it doesn't approach the same thing from both sides.
Post 03 Nov 2010, 02:08
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
1001 * xxx = xxx*10^3 + xxx:
1001*100=100'100
1001*101=101'101
1001*123=123'123
1001*666=666'666
1001*999=999'999
Post 17 Nov 2010, 08:33
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
Nerd Joke: Why do programmers confuse Halloween and Christmas?
Post 17 Nov 2010, 23:40
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
Post 18 Nov 2010, 02:09
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
I guess it's more popular a joke, than I thought. I didn't get it from there, my CS teacher told it to me(actually, the whole class, but you get the idea) earlier today.
Post 18 Nov 2010, 03:23
View user's profile Send private message Reply with quote
asmhack



Joined: 01 Feb 2008
Posts: 431
asmhack
The difference of a number from a same number but with it's digits in different order is always divisible by 9.

For example:
54321-12543=41778/9=4642
1100-1010=90/9=10
...
Post 21 Jan 2011, 15:05
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17271
Location: In your JS exploiting you and your system
revolution
asmhack wrote:
The difference of a number from a same number but with it's digits in different order is always divisible by 9.

For example:
54321-12543=41778/9=4642
1100-1010=90/9=10
...
Only true in base-10. Other bases have different divisors.
Post 21 Jan 2011, 15:35
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
1/0=Image=312F30h
Post 21 Jan 2011, 16:23
View user's profile Send private message Visit poster's website Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
what is the best way to calculate :

1+2+3+4+5+6+7+8+9+10+11+12+13+14....
all the way up to 100 = 5050:?:

for fun.. Smile


Last edited by dosin on 22 Jan 2011, 19:49; edited 1 time in total
Post 21 Jan 2011, 19:49
View user's profile Send private message Reply with quote
idle



Joined: 06 Jan 2011
Posts: 359
Location: Ukraine
idle
amazing
or imagine a table like, assuming you have 1,2,3,4,5
Code:
- - - - -
- - - -
- - -
- -
-
    

a triangle appears = 1/2nd of a rectangle = approximately width*hight/2
so in your case 5 =approx= 5*6/2 = 15
Smile
Post 21 Jan 2011, 20:20
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
dosin wrote:
what is the best way to calculate :

1+2+3+4+5+6+7+8+9+10+11+12+13+14....
all the way up to 100 = 2050:?:

for fun.. Smile
The arithmetic sum formula. If you want to find how many terms it takes to get to 2050, you can work backwards from 2050=n/2(2+(n-1)).
Post 21 Jan 2011, 20:26
View user's profile Send private message Reply with quote
idle



Joined: 06 Jan 2011
Posts: 359
Location: Ukraine
idle
00000011'11101000b = 1'000
00000000'01100100b = 0'100
00000000'00001010b = 0'010
Post 21 Jan 2011, 20:27
View user's profile Send private message Reply with quote
idle



Joined: 06 Jan 2011
Posts: 359
Location: Ukraine
idle
dosin:
... or multiply by 2 and find square root
Post 21 Jan 2011, 20:30
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
asmhack wrote:
The difference of a number from a same number but with it's digits in different order is always divisible by 9.
There exists a simple explanation of the aforementioned fact.

Let x be the natural number divisible by 9, i.e. x = 9*k for some k ∈ {0, 1, 2, ...}. Let y be the number obtained by any permutation of decimal digits of the number x.

A natural number is divisible by 9 if and only if the sum of its digits in decimal representation is divisible by 9. Because value of the sum is independent on the order of summation, so the sum of the digits of the number y is equal to the sum of the digits of the number x. Hence the number y is divisible by 9 and y = 9*m for some m ∈ {0, 1, 2, ...}.

Difference x - y is also divisible by 9 because x - y = 9*k - 9*m = 9*(k - m).
Post 22 Jan 2011, 19:06
View user's profile Send private message Visit poster's website Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
1+2+3+4+5 = 15

5 * 5 = 25

25 + 5 = 30

30/2 = 15
so ..

or 1+2+3+4+5+..........+100 =

100 * 100 = 10000
10000 + 100 =10100
10100 / 2 = 5050

how about all even...

2+4+6+8+10..... 100..
Post 22 Jan 2011, 19:49
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3 ... 14, 15, 16 ... 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.

Powered by rwasa.