Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using App Connections
  9. System Services, Listeners and Connectors
  10. Designing Human Tasks

Design

Design

sqrt

sqrt

The sqrt function in XQuery returns the square root of a non-negative numeric input value.

Syntax

math:sqrt(arg)
The following table describes the argument for this command:
Argument
Required/Optional
Description
arg
Required
A non-negative numeric value to compute the square root of.

Return Value

  • Returns the square root of the input value as a numeric.
  • Returns an empty sequence if the input is an empty sequence.
  • Typically results in an error or empty sequence if the input is negative, as the square root of a negative number is undefined in the real number domain.

Examples

The following table lists some sample values and return values:
SAMPLE FUNCTION
OUTPUT
math:sqrt(9)
3
math:sqrt(0)
0
math:sqrt(2)
1.41421356237
math:sqrt(-1)
Error or empty sequence
math:sqrt(())
()

Additional information

  • The input must be zero or positive for a real result.
  • The function returns a numeric value matching the input type or a compatible numeric type.
  • It handles empty input gracefully by returning an empty sequence.

0 COMMENTS

We’d like to hear from you!