May 23, 2013 at 12:16am UTC
Not sure exactly on your error probably something small you could put a couple lines in between each thing to check also you may want to use a double instead of an int since you are working with fp numbers.
May 23, 2013 at 1:50am UTC
lol so this was blowing my mind and after investigating I found your subtraction operators are funny, trolling? good one if so.. try copy paste my declare and it works:
double j = (((10 * fspl) - 32.44) - 20 * (log(10)) * (f / 20));
copy n paste yours
int y = (((10 * Free_Space_Path_Loss) – 32.44) – 20 * (log(10)) * (f / 20));
Last edited on May 23, 2013 at 1:51am UTC
May 23, 2013 at 1:56am UTC
You are missing a parenthesis after log(10). You should put the calculation onto multiple lines to make it easier to see.
May 23, 2013 at 2:12am UTC
Nope, He was trolling..That is why I couldn't figure it out either...
Copy and paste the Subtraction he used then the normal one...He needs a life
Ps it only shows the difference in quote looks the same in ouput and code tags. I reliazed the difference when I put it in the browser.
Last edited on May 23, 2013 at 2:13am UTC
May 23, 2013 at 2:14am UTC
Oh, I see. But he is missing a parenthesis after log(10). Report him if he is indeed a troll.
May 23, 2013 at 2:15am UTC
He is and he has the parenthesis after f/20
I haven't written C++ code in a while can you tell me what the problem with his bit of code?
int y = (((10 * Free_Space_Path_Loss) – 32.44) – 20 * (log(10)) * (f / 20));
EDIT - woah when did they fix the report button?
Last edited on May 23, 2013 at 2:16am UTC
May 23, 2013 at 3:59am UTC
Aren't you guys overreacting a bit? Maybe he's using some exotic keyboard layout that inserts en dashes instead of proper ASCII dashes.