Forum Discussion
mhupman_60939
Nov 07, 2011Nimbostratus
iRule Math - Square Root?
I hope I'm simply doing something wrong, but I cannot figure out how to calculate the square root of a number inside an iRule. I tried the sqrt() and pow() TCL functions, but it doesn't seem like th...
mhupman_60939
Nov 08, 2011Nimbostratus
For load balancing decisions, sure - I can't imagine many cases where advanced math functions would be necessary. But there are nearly infinite use cases for iRules. In my particular case, I am building a stats logger based on the Link Tracking CodeShare iRule (http://devcentral.f5.com/wiki/iRules.LinkTracking.ashx). One of the query string parameters my app uses contains a encoded version of the requestor's UserID. I wanted to display the unencoded UserID on that stats page (and also include a hyperlink to our internal CMS for that UserID) and the last step of decoding the UserID is to take the square root of the encoded value :)
Regardless of my particular use case, I can't imagine there is significant overhead involved in including the rest of the math functions. TCL compatibility is touted as a feature of the iRule engine - it would be nice if it followed the spec as closely as possible.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects