Audium Knowledge Base

Knowledgebase Home | Contact Knowledgebase Home | Contact
Search the Knowledgebase Jump to ID Browse by Category
Why does the built-in Math element store a value of -0 or NaN?
Categories: Audium Call Services 3.4.x and 3.5, Audium Call Services 3.6
Article ID: 261
Last updated: November 02, 2006
User Opinions
No users have voted.

How would you rate this answer?
Helpful
Not helpful

SUMMARY

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

SYMPTOMS

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

RESOLUTION

A value of "-0" may occur when working with negative numbers in expressions that would normally evaluate to "0".  This is not an error condition, and should be handled gracefully by any custom code or decisions your application uses to parse this value.

On the other hand, a value of "NaN" means that there was a problem evlauating the specified expression.  For example, division by zero would result in a value of "NaN".  Whenever your voice applications uses the built-in Math element, it should check for this value and handle it appropriately (e.g. perhaps exiting down a "math_error" exit state from a Decision element so that the call flow can continue).

Visitor Comments
No visitor comments posted. Post a comment
Related Questions
Attachments
No attachments were found.

Copyright (c) 2005 Audium Corporation. All rights reserved.
Audium Home | Audium Support Center Home | Audium Customer Care Home