News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Solving expressions

Started by RuiLoureiro, December 11, 2010, 06:58:37 PM

Previous topic - Next topic

Farabi

Also, 2^1.5 mean (2*1)*(2*0.5) in case you did not know.

4^4.5 = (4^4)*(4*0.5)
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

oex

If M$ Calculator says 0^0=1 who am I to disagree ^ ^ :lol
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

dedndave

oh - and....
0/0 and 1/0 are not 0   :bg
they are both undefined
although, i've had calculus instructors try to tell me they were infinity - lol

RuiLoureiro

TmX,
    «I found a simple bug»

    Its not a bug: The exponent must be a positive constant from 0 to 31
                   NOT an expression

dedndave,
          My Calcula19 gives 0^0=0 ( in higher math it is undefined )
          but (expression)^0 = 1   if expression is not 0
         
oex,
          «If M$ Calculator says 0^0=1 who am I to disagree»

          I disagree, if the base tends to 0 first it is 0 not 1
          Calcula19 must give a result and gives 0
         
Farabi,
          «Also, 2^1.5 mean (2*1)*(2*0.5) in case you did not know»

          My Calcula19 gives ERROR because exponent must be from 0 to 31

          Calcula19 works with any integer from -4 294 967 295 to 4 294 967 295
          so the result must be any integer from -4 294 967 295 to 4 294 967 295
          but the exponent must be from 0 to 31
           
        Thanks all

dedndave

Quotededndave,
          My Calcula19 gives 0^0=0 ( in higher math it is undefined )

i have taken too many courses in "higher math" - lol
what i am saying is, this is still a subject of discussion and disagreement amongst "higher" mathematicians

a realistic approach is to apply the right rule for the job, after evaluating with 0, 1, and undefined
usually, if this result pops out it means.....


Farabi

Quote from: oex on December 30, 2010, 11:49:02 AM
If M$ Calculator says 0^0=1 who am I to disagree ^ ^ :lol

Well I guess it is better than giving a crash "Division by zero" error message.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

Quote from: dedndave on December 30, 2010, 01:09:00 PM
Quotededndave,
          My Calcula19 gives 0^0=0 ( in higher math it is undefined )

i have taken too many courses in "higher math" - lol
what i am saying is, this is still a subject of discussion and disagreement amongst "higher" mathematicians

a realistic approach is to apply the right rule for the job, after evaluating with 0, 1, and undefined
usually, if this result pops out it means.....



Download the latest patch, it fixed, look



:green
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

dedndave

 :lol

you guys can do math, too !!!

oex

The assumption that has to be made is not whether 0^0=0 or 0^0=1 (as both are wrong).... The question is, with the avoidance of an error which will produce the best result in a greater equation....

If 0 then further
% = Divide By Zero Error
/ = Divide By Zero Error
* = 0
+ = Right Answer
- = Right Answer

If 1 then further
% = Right Answer
/ = Right Answer
* = Right Answer
+ = Answer + 1
- = Answer - 1

Either way a further answer is wrong :lol the difference is whether your answer is a maximum of 1 out or result out/errors I think :lol

0^0=1 is Error Handling (As it handles crash errors at the risk of minimal data loss)
0^0=0 is lazy Error Handling (As it favours one crash error over the next crash error)
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

RuiLoureiro

#54
dednadve
        i have taken too many courses in "higher math" - lol

        Yes i do

        EDIT:
                another solution is: 0^0= ERROR
                If you prefer edit .asm change it to exit with ERROR

oex

We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

RuiLoureiro

oex,
        contextualizing ? what do you mean ? 

oex

Quote from: RuiLoureiro on December 30, 2010, 05:57:24 PM
oex,
        contextualizing ? what do you mean ? 

Deriving a result based on result you need ie if your program will crash if you supply 0 or return error and it will sink the ship like here then return 1 even though it's wrong :lol
http://www.wired.com/science/discoveries/news/1998/07/13987
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

RuiLoureiro

#58
Quote from: oex on December 30, 2010, 06:01:10 PM
Deriving a result based on result you need ie if your program will crash if you supply 0 or return error and it will sink the ship like here then return 1 even though it's wrong :lol
http://www.wired.com/science/discoveries/news/1998/07/13987
                 too much logic... under logic  :wink

X^0=1                   0^X=0
(Why except 0?)         (Why except 0?)

Farabi

anyone tried this

mov eax,some_value
xor ecx,ecx
div ecx


I dunno if Im making mistake, but it create a fault on the processor. Anyone experiencing that? I did.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"