C chris200x9 macrumors 6502a Original poster Jun 3, 2006 906 0 Feb 17, 2008 #1 hi I was wondering if anyone could tell me what's wrong with this statement. Code: digit = (num/ pow( float base, numDigits - num);
hi I was wondering if anyone could tell me what's wrong with this statement. Code: digit = (num/ pow( float base, numDigits - num);
K kainjow Moderator emeritus Jun 15, 2000 7,958 7 Feb 17, 2008 #2 If you're trying to convert base to a float, your syntax is incorrect. And you're missing a matching parentheses. Try: Code: digit = (num/ pow( [b][color=red]([/color][/b]float[b][color=red])[/color][/b] base, numDigits - num)[b][color=red])[/color][/b];
If you're trying to convert base to a float, your syntax is incorrect. And you're missing a matching parentheses. Try: Code: digit = (num/ pow( [b][color=red]([/color][/b]float[b][color=red])[/color][/b] base, numDigits - num)[b][color=red])[/color][/b];
gnasher729 Suspended Nov 25, 2005 17,980 5,566 Feb 18, 2008 #3 chris200x9 said: hi I was wondering if anyone could tell me what's wrong with this statement. Code: digit = (num/ pow( float base, numDigits - num); Click to expand... After fixing the bugs, can you explain why you are throwing away most of the available precision?
chris200x9 said: hi I was wondering if anyone could tell me what's wrong with this statement. Code: digit = (num/ pow( float base, numDigits - num); Click to expand... After fixing the bugs, can you explain why you are throwing away most of the available precision?