# why "x/(x>0)" produce the same graph as "If(x>0,x)" ?

guyuming shared this question 7 months ago

i can input something like If(x>0, x) in Algebra zone, it works fine;

but if i input some like x/(x>0), it shows the same graph. why?

i can see that the "/" is parsed as DIVIDE in java code:  1

x>0 is either true (1) or false (0) 1

thanks! but if logical value true and false are treated as numerical value 1 and 0, why doesn't "x>0" produce the same graph as "if(x>0,1,0)" ? if the conversion from true/false to 1/0 is implicit in some context, is there an explicit function for this? 1

What result precisely are you expecting from x/(x>0)?  1

Whether inequalities are treated as numerical values depends on context. If you input an inequality, it's exactly that - an inequality - for Geogebra, and if it's one with only variables x and y and not too complicated (see https://wiki.geogebra.org/e... for details) then the Graphics view shows the corresponding area. (The yellow half plane in your example.)