## `Type::NonZero` -- a type and a property representing ``unequal to zero''

#### Introduction

`Type::NonZero` is a type of objects unequal to zero. `Type::NonZero` is a property, too, which can be used in an `assume` call.

#### Call(s)

`testtype(obj,` Type::NonZero)
`assume(x,` Type::NonZero)
`is(ex,` Type::NonZero)

#### Parameters

`obj` | - | any MuPAD object
`x` | - | an identifier or one of the expressions `Re(u)` or `Im(u)` with an identifier `u`
`ex` | - | an arithmetical expression

#### Returns

see `testtype`, `assume` and `is`

#### Related Functions

`testtype`, `is`, `assume`, `Type::Zero`

#### Details

- The call `testtype(obj,` Type::NonZero) checks, whether `obj` is not zero and returns `TRUE`, if it holds, otherwise `FALSE`.
- `testtype` only performs a syntactical test and uses the function `iszero` to determine, whether the object is not zero. This implies that identifiers without a value, for example, are considered as being different from zero, see example 1.
- The call `assume(x,` Type::NonZero) marks the identifier `x` as a complex number unequal to zero.

  The call `is(ex,` Type::NonZero) derives, whether the expression `ex` is a complex number unequal to zero (or this property can be derived).

- This type represents a property that can be used in `assume` and `is`.
- The call `assume(x <> 0)` has the same meaning as `assume(x,` Type::NonZero).

#### Example 1

Usage of `Type::NonZero` whith `testtype`:

    >> testtype(1.0, Type::NonZero)

                                       TRUE

Since `iszero(x)` returns `FALSE`, the following call returns `TRUE`:

    >> testtype(x, Type::NonZero)

                                       TRUE

#### Example 2

Usage of `Type::NonZero` whith `assume` and `is`:

    >> is(x, Type::NonZero)

                                      UNKNOWN

Assumption: `x` is `Type::NonZero`:

    >> assume(x, Type::NonZero):
       is(x, Type::NonZero)

                                       TRUE

The same again:

    >> assume(x <> 0):
       is(x <> 0)

                                       TRUE

The difference between `testtype` and `is`:

    >> delete x:
       is(x, Type::NonZero), testtype(x, Type::NonZero)

                                   UNKNOWN, TRUE

`x` could be zero:

    >> assume(x >= 0):
       is(x, Type::NonZero), testtype(x, Type::NonZero)

                                   UNKNOWN, TRUE

    >> delete x:

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000