How to make "Is x zero or nonzero?" in my function
Subject: How to make "Is x zero or nonzero?" in my function
From: David Billinghurst
Date: Mon, 11 Jun 2012 17:21:18 +1000
On 11/06/2012 6:11 PM, Evgeniy Maevskiy wrote:
> In my Maxima-function I have to ask the user
>
> Is x zero or nonzero?
> Is x positive or negative?
>
You want the asksign function.
%i1) asksign(x);
Is x positive, negative, or zero?
p;
(%o1) pos
(%i2) asksign(x^2);
Is x zero or nonzero?
z;
(%o2) zero