Wrong output given by pow(3, 38) function in C++

Правка en1, от cheapcoder, 2019-10-27 15:47:18

The pow function in CPP gives output 1350851717672992000 for input pow(3, 38), but the correct output is 1350851717672992080 i.e. output differs by 89. So what is the issue?

Didn't find any solution on the net!! c++ version 7.4.0

pow(3, 38) ==> Correct output is 1350851717672992089, but the function gives output 1350851717672992000 which differs by 89.

Теги #c++, #pow()

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский cheapcoder 2019-10-27 16:39:30 64
en1 Английский cheapcoder 2019-10-27 15:47:18 408 Initial revision (published)