Guest

Cisco Unified Call Services, Universal Edition

Why the Built-In Math Element Stores a Value of -0 or NaN

Cisco - Why the Built-In Math Element Stores a Value of -0 or NaN

Document ID: 71615

Updated: Jul 03, 2007

   Print

Introduction

This document explains various return values of the built-in Math element of which developers should be aware.

Prerequisites

Components Used

The information in this document is based on Cisco Unified Call Services, Universal Edition, and Cisco Unified Call Studio, Universal Edition.

Conventions

Refer to Cisco Technical Tips Conventions for more information on document conventions.

Background Information

Symptoms: The built-in Math element is used to evaluate an expression at runtime, but the resultant value is stored as either -0 or NaN.

Resolution: A value of -0 can occur with negative numbers in expressions that would normally evaluate to 0. This is not an error condition and can be handled by any custom code or decisions your application uses to parse this value.

A value of NaN means that there was a problem with the evaluation of the specified expression. For example, division by zero would result in a value of NaN. Whenever your voice application uses the built-in Math element, it must check for this value and handle it appropriately, for example, exit down a math_error exit state from a Decision element so that the call flow can continue.

Related Information

Updated: Jul 03, 2007
Document ID: 71615