Previous Page Next Page Contents

FAIL -- indicate a failed computation

Introduction

FAIL is a keyword of the MuPAD language. Many functions of the library use the return value FAIL to indicate failed computations or non-existing elements.

Call(s)


FAIL

Related Functions

error, NIL, null

Details

Example 1

The following attempt to convert sqrt(3) to an integer of a residue class ring must fail:

>> poly(sqrt(3)*x, [x], Dom::IntegerMod(3))
                                   FAIL

The following matrix is not invertible. You can try to invert it without producing an error:

>> A := matrix([[1, 1], [1, 1]]): 1/A
                                   FAIL

The "inverse" slot of a function environment yields the inverse of the function. The inverse of the sine function is implemented, but MuPAD does not know the inverse of the dilogarithm function:

>> sin::inverse, dilog::inverse
                              "arcsin", FAIL
>> delete A:

Example 2

Most functions return FAIL or an error on input of FAIL:

>> poly(FAIL)
                                   FAIL
>> sin(FAIL)
      Error: argument must be of 'Type::Arithmetical' [sin]

Example 3

FAIL evaluates to itself:

>> FAIL, eval(FAIL), level(FAIL, 5)
                             FAIL, FAIL, FAIL

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000