power (XFDL function)

Returns the number represented in number raised to the power indicated by power.

An error occurs if either of number or power is not a valid number.

Syntax

   power(number, power)
Table 1. power parameters
Parameter Type Description
number Decimal number Any decimal number.
power Decimal number Any decimal number representing the power by which the number will be raised.

Returns

A string containing the number raised to the power, or an empty string if an error occurs.

Example

In this example, the result of power is "100.00000".

   <field sid="powerTestField">
      <label>Test power()</label>
      <format>
         <datatype>string</datatype>
         <constraints>
            <mandatory>on</mandatory>
         </constraints>
      </format>
      <value compute="power('0.1', '-2')"></value>
   </field>