IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to compute for an exponential of a number


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
butchichay

New User


Joined: 04 Sep 2006
Posts: 2

PostPosted: Mon Jun 18, 2007 6:58 pm
Reply with quote

Hi,

Would anyone know how to compute for an exponential of a number?

For example,
4^2 = 16

What should i do with 4 to get 16?

Any help would be greatly appreciated.

Thanks!
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Jun 18, 2007 7:35 pm
Reply with quote

butchichay wrote:
Hi,

Would anyone know how to compute for an exponential of a number?

For example,
4^2 = 16

What should i do with 4 to get 16?

Any help would be greatly appreciated.

Thanks!


4 ** 2

Did you try looking in the manual.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Mon Jun 18, 2007 9:01 pm
Reply with quote

** is also fairly conventional, so always a good guess for your test.
Back to top
View user's profile Send private message
butchichay

New User


Joined: 04 Sep 2006
Posts: 2

PostPosted: Tue Jun 19, 2007 11:34 am
Reply with quote

Thanks for the reply!

It was really of big help!
Back to top
View user's profile Send private message
arpita soni

New User


Joined: 19 Jun 2007
Posts: 3
Location: mumbai

PostPosted: Tue Jun 19, 2007 12:27 pm
Reply with quote

Hi,
Kindly let me know the way how to compute the exponential of a number:

e.g:

5 ^ 4

= 32 combinations.

answer to the above query has not been provided.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 19, 2007 2:08 pm
Reply with quote

Hello,

How to calculate an "exponential" is posted already in the topic icon_confused.gif

What does this mean?
Quote:
5 ^ 4

= 32 combinations.
5 raised to the 4th is not 32 - 2 raised to the 4th is 32 and that is what is shown in the previous info.

Please show what you mean by 32 combinations. . .
Back to top
View user's profile Send private message
tosaurabh20

New User


Joined: 08 Jun 2007
Posts: 26
Location: Noida

PostPosted: Tue Jun 19, 2007 5:34 pm
Reply with quote

2 raise to power of 4 is not 32.

it is 2 raise to power of 5 which comes out to be 32.
which can be interpreted as 2**5 in cobol.

Thanks
Saurabh
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 19, 2007 6:31 pm
Reply with quote

Hello,

My bad icon_redface.gif - didn't check well when keying this
Quote:
Quote:
5 ^ 4

= 32 combinations.

5 raised to the 4th is not 32 - 2 raised to the 4th is 32


As has been pointed out, 2 to the 5th is 32. What i was trying to point out is that 5 to the 4th isn't 32 icon_confused.gif (unless that also was a typo. . .

Thanx for the correction icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
No new posts Cobol program with sequence number ra... COBOL Programming 5
Search our Forums:

Back to Top