flat assembler
Message board for the users of flat assembler.
Index
> Heap > Simple math problem/question Goto page 1, 2, 3 Next 
Author 

idle
what to do?
that's just a getting used to count left to the right and nothing more Code: > 6:2(2+1) = (6/2)*3 < 6:2(2+1) = 6/(2*3) 

16 May 2011, 02:53 

Tyler
Whoever started this shit, I want to find them, and murder them so gruesomely that the news of it spreads, to all who will ever possibly consider repeating the same(or similar) question, the answer to the question and the consequences of asking it.
http://www.physicsforums.com/showthread.php?t=494675 

16 May 2011, 03:13 

Tyler


16 May 2011, 03:23 

Enko
a guess both post should be joined
http://board.flatassembler.net/topic.php?t=12848 as it talks about the same. bye the way, google calc resolves it preaty well. 

16 May 2011, 04:31 

Overflowz
I was thinking like that! First should be division because it's first and after that multiplication. it's 9! ))


16 May 2011, 12:19 

edfed
for me, 6/2(2+1)=1
because the math rules are strict. 6/2(3) 6/6 1 the other way to solve is illegal. we can push the limit of error with more missconceptions like: 6/2(2+1) 3(3+1) 6+1 7 6/2(2+1) 6/2(2) + 6/2(1) 3(2) + 3(1) 6+3 9 lol; the only solution is 1.


16 May 2011, 12:46 

Enko
Overflowz wrote: I was thinking like that! First should be division because it's first and after that multiplication. it's 9! )) are you shure its 9? 6:x(2+1) = 1 resolve X. should be x=2. or is it 6:x(2+1) = 9 ? the problem with this, that its bad scripted, still you can get to the write result, but for the meter of fact, normaly: x(2+1) = 2x + 1x = 3x. so now its 6:3x and not 6:x3 where x=2. becouse the brackets come before multiplication and division, and becouse of bad scripting, one try to first, resolve the brackets changing the order of precedence. still the write result is 9, but of a metter of fact, its come becouse of bad writng, theres a tone of better ways to write this: 6 : 2 · (2+1) //this way the implied multiplication 2(2+1) is gone. 6  (2+1) 2 // the implied multiplication is still there, but its much more intuitive efded google for 6/2(2+1), or put it in your cientific calc, the result is 9, not 1. the multiplication does not have priority above division, so you perform from left to write, fist division, then multiplication in this case. 

16 May 2011, 13:34 

Enko
by the way
Code: x equ 6/2*(2+1) db x+48 ;48 is for ascii transformation, I dont have a hex editor. if you open it as text file, it display 9 

16 May 2011, 13:53 

edfed
Quote: efded don't rely on google for everything, as any trade mark shouldn't be believed because the principal actions from companies like this is to impose their vision without the agreement of the rest of the world. my casio fx92 answers 1, it is logical. the ti8x answer this too. when i type 6/2(2+1), google answer (6/2)(2+1). 

16 May 2011, 14:06 

idle
edfed
Code: seg000:1011 push eax seg000:1013 push ebx seg000:1015 mov eax, [edi+4] seg000:101A mov ebx, [edi+8] seg000:101F add [esi+4], eax seg000:1024 add [esi+8], ebx seg000:1029 pop ebx seg000:102B pop eax seg000:102D retn seg000:102D sub_11011 endp should not seg000:1024 be adc 

16 May 2011, 14:11 

Enko
edfed wrote:
and what about this? Code: x equ 6/2*(2+1) db x+48 ;48 is for ascii transformation, I dont have a hex editor. you are telling me that the fasm preprocesor is wrong? 

16 May 2011, 14:16 

edfed
6/2(2+1) is not the same as 6/2*(2+1) for my calcultator too.
2(2+1) is interpreted as (2*(2+1)) 2X cannot be cuted 2*X can 

16 May 2011, 15:07 

edfed
idle wrote: edfed not at all, this function have nothing to do with the calculator. from memory, it is something like X,Y coordinates update in the system librairy. Code: addxy: 00000F11: 66 50 66 53 push eax ebx 00000F15: 67 66 8B 47 04 mov eax,[edi+item.x] 00000F1A: 67 66 8B 5F 08 mov ebx,[edi+item.y] 00000F1F: 67 66 01 46 04 add [esi+item.x],eax 00000F24: 67 66 01 5E 08 add [esi+item.y],ebx 00000F29: 66 5B 66 58 pop ebx eax 00000F2D: C3 ret and it is really time for fasmW to provide a "listing" button, just under the "build symbols" button in "run" menu. the calculator code starts a lot far away from the start of the total code. Code: 0000BB43: 48 02 00 00 0A 00 00 00 0A 00 00 00 78 00 00 00 Gnode .x,.y,.xl,.yl,\ 1E 00 00 00 0C 00 00 00 2F BD 00 00 67 BC 00 00 clavier,\ 54 BA 00 00 ecran,\ grabber 

16 May 2011, 15:13 

Enko
http://epsstore.ti.com/OA_HTML/csksxvm.jsp?nSetId=103110
Quote:
As I understand, ther no such thing in math as "implied multiplication" But its some how used in the calculators so you can easly input without using brackets and if you read the full source, you can see that the same type of graphical calculator TEXAS some do first implied multiplication, other dont bother to note the diference. 

16 May 2011, 15:28 

Overflowz
In my opinion:
6:2(2+1) = 6/2*3 = 3*3 = 9. because of first action is division and second is multiplication. I think we need to relearn Basic Math rules.. 

16 May 2011, 18:56 

edfed
Overflowz wrote: In my opinion: not learn, but define. because it is a convention problem. my casio returns 1 for 6/2(2+1) and returns 9 for 6/2*(2+1), and i find it is logical as implied multiplication is apparented to an unbreakable link, exactlly as if there were parenthesis around its terms. 

16 May 2011, 18:59 

Enko
edfed wrote:
As i posted alredy, in the graphic calculatores, some models, they first do implied multiplications to permit write formulas as you do on paper. what I mean: 6/2(2+1), on paper should look like: 6  2(2+1) its done this way, so you shouldnt use extra brackets in your calc. so the thing is, you need to know how your calc is designed. in hischool, I always wrote extra brackets on my calc, this way I avoid this nightmare. (6/2)(2+1) or 6/(2(2+1)) its not math problem, but more like the scintific calculators notation simplification. by the way, on paper, I dont remember using the / slash for division, only on the units, like km/h . Normally, its used the  dash. like 6 (2+1) 2 

16 May 2011, 19:41 

typedef
What happened to PEMDAS ?
I see ppl going crazy ? Can you all do this : Given F: 2, X: 2  Simplify: F( POW(2,X) + SQRT(100) + XF ) 

16 May 2011, 22:38 

edfed
finally, it is not a so " Simple math problem/question".
i like this board. 

17 May 2011, 11:03 

Goto page 1, 2, 3 Next < Last Thread  Next Thread > 
Forum Rules:

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