You are not logged in. Please login at www.codechef.com to post your questions!

×

Doubt in c++

Why something like printf("%.0f\n",pow(2,1001)) gives correct output even though it is supposed to give correct output upto pow(2,64)?

asked 19 Sep '15, 01:06

sandeep9's gravatar image

3★sandeep9
4782827
accept rate: 4%


No its not giving the correct output. Its just giving the first 17 digits correctly

link

answered 19 Sep '15, 17:02

suraj_ch77's gravatar image

5★suraj_ch77
513
accept rate: 33%

Its not giving correct output

link

answered 25 Sep '15, 18:10

vigilante_56's gravatar image

0★vigilante_56
1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,911

question asked: 19 Sep '15, 01:06

question was seen: 1,527 times

last updated: 25 Sep '15, 18:10