Previous Page Next Page Contents

numlib::issqr -- test for perfect squares

Introduction

numlib::issqr(a) returns TRUE if a is the square of an integer, and FALSE otherwise.

Call(s)

numlib::issqr(a)

Parameters

a - an integer

Returns

numlib::issqr returns TRUE, FALSE, or the unevaluated call.

Related Functions

isqrt, numlib::ispower, sqrt

Details

Example 1

361 is the square of 19:

>> numlib::issqr(361)
                                   TRUE

Example 2

362 is not a square:

>> numlib::issqr(362)
                                   FALSE

Example 3

Negative integers are not squares:

>> numlib::issqr(-361)
                                   FALSE

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000