flat assembler
Message board for the users of flat assembler.
Index
> Heap > Numerical oddities Goto page Previous 1, 2, 3 ... 10, 11, 12 ... 24, 25, 26 Next 
Author 

windwakr
Lol, are there others like that?


06 Oct 2009, 19:59 

edfed
i've found it accidentally, when converting the spare bytes from my current boot code in base 10.
[] 1d = 1h 

06 Oct 2009, 20:03 

windwakr
I learned a little Python(EWWWWW, worst language EVER) over the last few days so I could modify an exporter for Blender. With that knowledge I threw a script together to get this. Should be all the ones from 1 though a million.
0d = 0h 1d = 1h 2d = 2h 3d = 3h 4d = 4h 5d = 5h 6d = 6h 7d = 7h 8d = 8h 9d = 9h 53d = 35h 371d = 173h 5141d = 1415h 99481d = 18499h 8520280d = 820258h EDIT: WOW! Just finished doing 1 through 100 million. Guess what....NOTHING NEW! Here's the Python(Ewwwww, worst language EVER) script in case anyone wants to know it: Code: a = 1000000 num=0 while a: val=int(str(num),16) m=list(str(val)) m.reverse() numString=''.join(m) val2=int(numString) if num == val2: print "%id = %ih" % (val,val2) num+=1 a=1 Just replace the number in "a = 1000000" with whatever you want to test up to. I need some way to clear my memory of this horrid language. Just look at it! I'd rather sit and stare at thousands of lines of assembly than look at 100 lines of Python. 

06 Oct 2009, 20:28 

Borsuc
WTF you're joking right? I mean, it looks kinda Cish so it has good syntax. It looks like a nice language.
_________________ Previously known as The_Grey_Beast 

06 Oct 2009, 23:05 

windwakr
Hey, I'm someone who codes exclusively in ASM, brainfuck, and Befunge ......I don't like anything "Cish".


06 Oct 2009, 23:42 

revolution
Either:
a) Show a decimal repdigit number evenly divisible (i.e. no remainder) by 16 or b) prove there are no decimal repdigits divisible by 16 

07 Oct 2009, 00:00 

revolution
I should deduct points for using HLL programs to do brute force testing like that!
Hmm, actually no, perhaps better would be for me to make a new problem that cannot be solved by brute force. Let me think about it. 

07 Oct 2009, 01:22 

windwakr
Ya, I don't know what came over me. It's just so easy to use. I've been dragged into the dark side.


07 Oct 2009, 01:24 

ass0
same as above but in javascript:
Code: <html> <head> <title> hex </title> </head> <body> <pre> <h3> <script> var a = 9; var b = 1; while(a){ var c = 4; while(c){ var d = ((Math.pow(10, c)1)/9)*b; var e = d+"\n"; if((d%16) == 0){ e = d+"is divisible by 16\n"; } document.write(e); c; } a, b++; } </script> </h3> </pre> </body> </html> 

07 Oct 2009, 01:28 

Borsuc
windwakr wrote: Hey, I'm someone who codes exclusively in ASM, brainfuck, and Befunge ......I don't like anything "Cish". There's even C if you want to go lowlevel (use registers in a Cish language) _________________ Previously known as The_Grey_Beast 

07 Oct 2009, 14:16 

Pinecone_
since we're translating that code, how about a befunge version?
Code: >4:080pv \,:"10"<_v#:1p08+*+55g08 >:#,_$ v>80g82*%#v_0"61 yb elbisivid si " :55+,:>$# 1# #< v >$$41g1+:":"!#@ #~_41p (thought it'd be good practice, and it was, suprisingly it took a fair while and a few different approaches to get that working and tested) Last edited by Pinecone_ on 10 Oct 2009, 09:44; edited 1 time in total 

09 Oct 2009, 14:33 

kohlrak
Powers of 2 divisibility rules...
2 if rightmost is... 4 if righmost 2 are... 8 if rightmost 3 are... 16 if rightmost 4 are... Could i take a guess that continues? That'd be a numerical oddity in itself (or am i restating a fact a few pages ago?). 

10 Oct 2009, 07:26 

revolution
Choose two arbitrary numbers, a and b
Code: a + b = c (a + b)(a  b) = c(a  b) a^2  b^2 = ca  cb a^2  ca = b^2  cb a^2  ca + (c^2)/4 = b^2  cb + (c^2)/4 (a  c/2)^2 = (b  c/2)^2 a  c/2 = b  c/2 a = b 

24 Mar 2010, 09:53 

MHajduk
revolution wrote: Choose two arbitrary numbers, a and b Code: a  c/2 = b  c/2 Code: a  c/2 = b  c/2 because always Code: sqrt(x^2) = x 

24 Mar 2010, 10:08 

revolution
MHajduk: Sorry, not the answer. There is something missing, but it is not that.


24 Mar 2010, 10:16 

MHajduk
revolution wrote: MHajduk: Sorry, not the answer. There is something missing, but it is not that. 

24 Mar 2010, 10:19 

revolution
No, I was not kidding. Hehe, your "solution" leads to the same incorrect result as I posted.


24 Mar 2010, 10:38 

MHajduk
revolution my and yours results aren't the same!!! Seems, that you don't know maths.
Now, let's see what mean a  c/2 and b  c/2. Because c/2 = (a+b)/2 we have a  c/2 = a  (a + b)/2 = (2a  (a + b))/2 = (2a  a  b)/2 = (a  b)/2 Similarly b  c/2 = b  (a + b)/2 = (2b  (a + b))/2 = (2b  a  b)/2 = (b  a)/2 So a  c/2 = b  c/2 could be transformed into (a  b)/2 = (b  a)/2 What gives us a  b = b  a what is always true because a  b = (ba) = b  a Hence the proper answer is a  b = b  a What, of course, doesn't mean that a = b! Last edited by MHajduk on 24 Mar 2010, 11:11; edited 4 times in total 

24 Mar 2010, 10:49 

kohlrak
When all else fails, put in actual numbers... If the case is ever false, all it takes is one situation. Arguing with alphabet soup will get you nowhere.


24 Mar 2010, 10:57 

Goto page Previous 1, 2, 3 ... 10, 11, 12 ... 24, 25, 26 Next < Last Thread  Next Thread > 
Forum Rules:

Copyright © 19992020, Tomasz Grysztar. Also on YouTube, Twitter.
Website powered by rwasa.