You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Raises a value to the power of another value.

Syntax

Result = SRP_Math("POW", Value1, Value2, DecimalPlaces, ScientificNotation)

Returns

The result of Value1 raised to the Value2 power.

Remarks

The POW operation raises Value1 to the Value2 power.

Both Value1 and Value2 can be any decimal or whole number, but if it either one is too large, 0.0 is returned. There is no error returned because the limit is based on available memory.

Example

 
// Calculate PI squared 
Val = "3.1415926535897932384626433832795"  
Result = SRP_Math("POW", Val, 2) 
!! Result = 9.86960440108935861883449099987613 !! 
 
 
// Calculate 2 to the 128 power, which is beyond 32 bit limits 
Result = SRP_Math("POW", 2, 128) 
!! Result = 340282366920938463463374607431800000000.0 !!
  • No labels