|
[Date Index]
[Thread Index]
[Author Index]
Re: I don't understand in Mathematic
At 4:53 PM -0500 1/20/98, alok. menghrajani wrote:
>Hi,
>
>I'm 16 and I can't understand how I (why me?) found this bug in
>mathematica. It's such a silly thing:
>
>Solve [x/x+x=1, x] returns x=0 but if x=0 then x/x has no sence!
>
>Bye, ALok
>
>(Pls reply to my email: robot@writeme.com)
Just for fun I have written a simple replacement for Solve which
correctly solves x/x+x==1 and similar stupid equations. Any comments?
solve[eqn_,var_]:=
Module[{e=Hold[eqn],v=var,u=Solve[eqn,var]},
If[Union[Flatten[ReleaseHold[e/.u]]]=={True},u,Null,"Stupid
equation!"]] SetAttributes[solve,HoldAll]
solve[x+1==0,x]
{{x->-1}}
solve[x/x+x==1,x]
....Error messages...
Stupid equation!
Prev by Date:
Cell bracket <-> Inline
Next by Date:
Customizing your keyboard by creating new aliases
Prev by thread:
Re: I don't understand in Mathematic
Next by thread:
Re: I don't understand in Mathematic
|