Error, (in et) cannot determine if this expression is true or false: Pi < 0.1e-13 - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

Home : Support : Online Help : Error, (in et) cannot determine if this expression is true or false: Pi < 0.1e-13

Error, cannot determine if this expression is true or false: ...

Error, (in ...) cannot determine if this expression is true or false: ...

 

Description

Examples

Description

Maple cannot determine whether something is true or false in an if statement or while clause.

Examples

 Example 1

A typical occurrence happens when a procedure that requires numeric arguments is called with symbolic arguments.  Here are three examples with the same underlying problem:

(2.1)

Error, (in f) cannot determine if this expression is true or false: x < 0

Error, (in f) cannot determine if this expression is true or false: x < 0

Error, (in f) cannot determine if this expression is true or false: x < 0


Maple evaluates the inputs to a procedure such as plot before it calls the procedure, resulting in  being called with the symbolic argument . Since  has not yet been assigned a value, Maple cannot determine if  is less than . You can either delay the evaluation of the input using unevaluation quotes, or you can supply the arguments with operator form.

Solution 1

Here we use unevaluation quotes around . For details, see Unevaluated Expressions.

Solution 2

Here, we supply the operator form to the plot function.  (Note it is  not  in the first argument to plot.)

Solutions for the fsolve and evalf/Int problems

(2.2)

(2.3)

(2.4)

(2.5)

 

Example 2

In this example, we want to use a loop to find primes less than 15.  The error happens because i needs an initial value.

Error, cannot determine if this expression is true or false: 15 < nextprime(i)

Solution 1

Before beginning the loop, assign i to a starting value.

(2.6)

(2.7)

Solution 2

Alternatively, use the from clause to set a starting value.

(2.8)

For more information about loops, see The Repetition Statement.

See Also

fsolve

Numerical Integration

plot

The Repetition Statement

Unevaluated Expressions

 


Download Help Document