Question

What is the value of sqrt(pow(fabs(-4.0),3)) in c++?

What is the value of sqrt(pow(fabs(-4.0),3)) in c++?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

fabs(n) in C++ Returns the absolute value of n: |n|. It is different from Abs() in a way it will not truncate decimals.

Pow(x,n) return the X^n means Pow(2,3) will return 2^3=8

Sqrt(x) will return the square root of X. SQRT(4) will give 2.

So sqrt(pow(fabs(-4.0),3)) will give : 8

because first fabs(-4.0) will calculate and give 4

then pow(4,3) will give 64

then sqrt(64) will give 8.

Add a comment
Know the answer?
Add Answer to:
What is the value of sqrt(pow(fabs(-4.0),3)) in c++?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT