# Thread: How to convert real value to exponential value or vice versa

1. ## How to convert real value to exponential value or vice versa

What is method or functions to convert real value to exponential or vice versa in Winrunner
ex:
real value:53568544768
exponential:5.3569E+10

2. ## Re: How to convert real value to exponential value or vice versa

In WinRunner itself? None. But maybe there is something ine of the CSO libs, or the mercury Knowledge Base.

I'm curious. Why do you want to do this?

3. ## Re: How to convert real value to exponential value or vice versa

For exp to real, WinRunner does the conversion automatically.
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">var = 5.3569E+10;
pause(var);
#displays 53569000000</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">For real to exp, use sprintf:
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">var = sprintf(&quot;%e&quot;,53568544768);
pause(var);
#displays 5.356854e+010</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">

4. ## Re: How to convert real value to exponential value or vice versa

Oh yeah - thanks, Brett -- forgot all about sprintf. OOPS! Back to the classroom, I guess.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.