Why do I get different results when compiling the same code with different ide?
Different compilers produce different machine code.
As Majenko pointed out, the Arduino IDE's compiler, which happens to be GCC, uses float even when you write double.
The Atmel Studio creates double for double, using twice as much bits.
Calculating with more bits takes longer.