Aug 8, 2006 #1 F fatma1000 Banned Joined Apr 30, 2006 Messages 147 Helped 3 Reputation 6 Reaction score 2 Trophy points 1,298 Location eygpt Activity points 0 help12 c++ the function pow like pow(2,4) is correct but whin the first number is fraction like pow(0.5,4) it is not correct why? how can i make power for fraction like (0.5) powered to 4 0.5*0.5*0.5*0.5 regards
help12 c++ the function pow like pow(2,4) is correct but whin the first number is fraction like pow(0.5,4) it is not correct why? how can i make power for fraction like (0.5) powered to 4 0.5*0.5*0.5*0.5 regards
Aug 9, 2006 #2 A Anno Advanced Member level 4 Joined Feb 8, 2006 Messages 106 Helped 14 Reputation 28 Reaction score 0 Trophy points 1,296 Location South Africa Activity points 1,899 help12 c++ if my long forgotten maths serves me here: pow(0.5,4) = 1/pow(2,4)
Aug 9, 2006 #3 S Slayerza Full Member level 5 Joined Oct 22, 2005 Messages 295 Helped 27 Reputation 54 Reaction score 5 Trophy points 1,298 Location South Africa Activity points 3,462 Re: help12 c++ The above method works but only for fractions less than 1. You can use the above and the pow(x,y) function in a recursive loop to solve the problem. Cheers Slayer
Re: help12 c++ The above method works but only for fractions less than 1. You can use the above and the pow(x,y) function in a recursive loop to solve the problem. Cheers Slayer