Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Display the exponential numbers in normal form

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 208
Location: Cochin/Kerala/India

PostPosted: Tue Jan 19, 2016 6:28 pm    Post subject: Display the exponential numbers in normal form
Reply with quote

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
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Tue Jan 19, 2016 7:01 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Jan 19, 2016 7:03 pm    Post subject: Reply to: Display the exponential numbers in normal form
Reply with quote

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
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Wed Jan 20, 2016 12:04 am    Post subject:
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1218
Location: Israel

PostPosted: Wed Jan 20, 2016 9:31 pm    Post subject: Re: Display the exponential numbers in normal form
Reply with quote

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...
icon_rolleyes.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Row-Numbers of distinct rows? Auryn DB2 1 Thu Oct 20, 2016 4:38 pm
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
This topic is locked: you cannot edit posts or make replies. Get and display content of an address... lind sh CICS 1 Mon Aug 08, 2016 9:18 am
No new posts comparing comp-3 and unpacked numbers juares castro COBOL Programming 3 Mon May 30, 2016 6:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us