+ 6
how i get an accurate answer of this
(0.001/i^i) i=from 1to1000 in java when i do the loop the answer will be 0
9 Respostas
+ 2
But isn't ^ the xor operator?
+ 14
Mmmh, what output did you expect?
If the dividend is constant and the divisor gets bigger and bigger (nearing infinity), the quotient will come near to 0 (limit value examination).
Double can't hold infinite decimal places, so the result will be 0.0 from a certain iteration onwards.
+ 9
Like that?
import java.util.*;
//...
Math.pow(10, -100);
+ 7
Jonas Schröter It is, but as this doesn't make sense in this context, I assumed it to mean i to the power of i.
+ 7
ABADA S Sorry, but get what? What result do you expect?
+ 3
Tashi N
Thanks for this information ...
so is not it possible to get this
+ 3
1*10-^100
+ 3
first i can call this method without any import second i don't want this number like that i want to show this by division ,, thanks
+ 1
Well, that was my thought also