October 2nd, 2011, 10:41 AM

Yes, but dont understand everything. I just need to do a program in few days. This is my first program and I am still learning everything.

October 2nd, 2011, 09:52 AM

so it is posible to make working with all values, if az i take 0.000000001 then it is not working, so i need to add more 0.00000000000000001 in compare, it is other way?

October 2nd, 2011, 09:45 AM

so

if ( fabsf(c - a) < 0.000001 ) is the best and shortest way?

October 2nd, 2011, 09:32 AM

when add one time its true, but when you do it with cycle it looks something like this

a = -0.1 + 0.01000000001 and so on

and then you compare 0 with a it is looks something like this 0 !=...

October 2nd, 2011, 09:16 AM

Yes, it works, but maybe it is shortes way to compare c-a is 0?

October 2nd, 2011, 09:14 AM

Yes, but why in my code -0.1 + 0.1 is not 0?

October 2nd, 2011, 09:10 AM

Im still geting

1 -1 0

1.11 -0.9 0

1.25 -0.8 0

1.43 -0.7 0

1.67 -0.6 0

2 -0.5 0

2.5 -0.4 0

October 2nd, 2011, 08:42 AM

but abs want me to use int, my a and c is floats

October 2nd, 2011, 07:00 AM

Im reading, and Im very new in C++, so I dont find how I can do the folowing that a == c, then a and c is floats.

October 2nd, 2011, 06:08 AM

OK, i have a script, which calculate Y=1/(C-A). C is input, A is intetrval [Ap;Ag] with step Az;

And i have one problem, when c=2, A[-1.5;2.5] with step 0.1, when i want to say that 0 isn't possible...