Re: My problem in Maxima: The if-statement




<earthnut@xxxxxx> skrev i en meddelelse
news:1141866153.936689.283250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0^x = 0 for x <> 0

sorry, 0^x = 0 for x > 0, but for x < 0 it is not a number


I agree. 0^0 or 0^(negative value) also cause error messages in Maxima.

It can be a little confusing sometimes. 0^0 '=' 0^(-0) '=' 1/ (0^0), which
again causes 'division by zero'. 0^0 can't really be defined, not even with
this rule. One could think that 0^0 simply equals 0, but then the question
is: Is it 0^0 '=' 0 or is it 1/(0^0) '=' 1/0 -> infinite?

On the statement, that I wrote:

f(x):= if x>1 then 1 else 0;

I found this solution:

h(x):= 1/2 * signum(x-1) + 1/2;

(On signum(x); in Maxima: x=-1 for x<0, x=0 for x=0 and x=1 for x>0)

So that problem doesn't matter so much anymore.But I need this if-statement
for something else, because this f(x) was just an example.

PC


.



Relevant Pages

  • Re: code question
    ... The fact that zero is returned is just a simple way to guarantee that ... But my code issues error messages on both inputs already. ... A malformed input is ...
    (comp.lang.c)
  • Re: finding minimum
    ... >I differentialted 1/2a with respect to a and set it equal to zero. ... Rewriting this, we have ... on, it should be s imple matter to check the maximum value ... maxima will be the global maximum. ...
    (sci.math)
  • Re: Linear Algebra Challenge
    ... so I resorted to Maxima. ... constraint that the determinant of the matrix has to be zero. ... I tried using MSLV on my 49g+ to solve for the 15 ... Since that didn't work I tried to minimize this dist function by ...
    (comp.sys.hp48)
  • Hidding error messages
    ... Is there anyway to hide error messages? ... I have two field in my report that ... are zero divded by zero issues. ... So I get #num! ...
    (microsoft.public.access.reports)
  • Re: Change the color of a line on a form via VB
    ... If you replace the zero with, say vbRed, the line will ... I get no error messages. ... There's ALWAYS more than one way to skin a cat! ... Answers/posts based on Access 2000 ...
    (microsoft.public.access.forms)