View previous topic :: View next topic

Author 
Message 
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India




Hi All,
I am trying to find exponential of number and writing to the file using REXX.
But am getting output with exponential format.
For eg: for 2** 32, the data is coming as 4.2949673E+9
Is any function is there to display it in normal form?
Regards,
Bipin Peter 

Back to top 


Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL




Use NUMERIC DIGITS to set a maximum number of digits not less than the digits left of the decimal point and not less than half the number of digits to the right of the decimal point of your longest numeric string(s). Depending on how you're using the number(s), you may also have to change NUMERIC FUZZ. 

Back to top 


Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7311 Location: Inside the Matrix




You mean you want to have 2**32 in your output? You don't want it interpreted as a number? You did put quotes around it? Can you show your code? 

Back to top 


prino Warnings : 1 Senior Member
Joined: 07 Feb 2009 Posts: 1238 Location: Vilnius, Lithuania




This
Code: 
/* REXX */
numeric digits 50
say 'Expression: 2**166'
say 'Result :' 2**166 
results in this when EX'ed:
Code: 
Expression: 2**166
Result : 93536104789177786765035829293842113257979682750464 


Back to top 


Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1348 Location: Israel




bipinpeter wrote: 
I am trying to find exponential of number ... But am getting output with exponential format. 
You have to be clear about what you have, what you get and what you want!
All I can understand is that you want exponential format but instead you get exponential format...


Back to top 


