Hello!here is my question : how can i find the min x for this equation

x+10^5=x

Printable View

- 12-22-2013, 11:55 PMIonosnumerical problem
Hello!here is my question : how can i find the min x for this equation

x+10^5=x - 12-23-2013, 12:10 AMjim829Re: numerical problem
First, what does this have to do with Java? Second, x does not exist. Subtract x from both sides and you get 10^5 = 0 which is false.

Regards,

Jim - 12-23-2013, 12:23 AMIonosRe: numerical problem
Ok i have to explain more.This is an equation with the numerical analysis rules(computer epsilon)

I type here my question because i want to make a programm in java that compute the min x

thanks for anwser me. - 12-23-2013, 01:02 AMjim829Re: numerical problem
Well, unfortunately I am unable to help. I have had numerical analysis a long time ago but I am still not certain what you are asking. But there are lots of bright people on this forum so one of them should be able to help. However, no one here will write the code for you. They will only give you hints and point you in the right direction.

Regards,

Jim - 12-23-2013, 01:27 AMIonosRe: numerical problem
Thanks jim.Of course i dont want the code from anyone.i have make something

but i m not sure that this is correct:

double e=2;

while(e+10^6>e){

e*=e;

}

So with the first look this is an infinity loop but for a big e its equals.so when we exit the loop the

e is the min x? - 12-23-2013, 02:14 AMNormRe: numerical problem
Strange that ( x + N > x ) can be false with N > 0. Is this some test of the limits of computers to hold a numeric value? For example large positive int values roll over to negative values when they reach their bit size limit. For example:

Code:`int x = 0x7FFFFFFF;`

System.out.println(x > (x + 1)); // true

- 12-23-2013, 02:59 AMjim829Re: numerical problem
Well, looking at your loop I still say that e + 10^6 > e will always be true since e will never be negative from a pure mathematical sense. Now e *= e can approach infinity in Java. But your loop would stop earlier due to limitations of decimal computations. Perhaps that is what you are seeking.

And it should be

Code:`while(e + 1_000_0000 > e)`

//or

double error = Math.pow(10,6);

while (e + error > e)

Jim