c++ - std::pow gives a wrong approximation for fractional exponents -


मेरा क्या मतलब है

  डबल एक्स = 1.1402 डबल पॉ = 1 / 3; Std :: pow (x, pow) -1;  

परिणाम 0 है लेकिन मुझे उम्मीद है कि 0.4465

समीकरण (1 + x) ^ 3 = 1.1402 है, एक्स

1/3 पूर्णांक अंकगणित के रूप में किया जाता है, तो आप 0 से 'पाउ' बता रहे हैं पाउ (एक्स, 1.0 / 3.0) का प्रयास करें;


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -