Solved

Power function that accepts real numbers

Posted on 2007-03-24
4
162 Views
Last Modified: 2010-04-01
I need an algorithm or C++ pseudo code for exponentiation with real numbers, i.e. 2^3.5.

Thanks
0
Comment
Question by:gromul
  • 3
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 18787436
#include <math.h>
pow(2.0,3.5);
0
 

Author Comment

by:gromul
ID: 18787444
I got that, but how would I code this function myself?
0
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
ID: 18787474
exp(log(2.0)*3.5)
0
 
LVL 84

Expert Comment

by:ozo
ID: 18787475
2*2*2*sqrt(2)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now