Formula calculation and printing negative value.
The AVR libraries don't compile in support for printing of floating point values by default. This is to save space on their limited resource environments. You need to tell the compiler and the linker to enable support for this feature.

From the avr-libc documentation on vfprintf():


  Since the full implementation of all the mentioned features becomes
  fairly large, three different flavours of vfprintf() can be selected
  using linker options. The default vfprintf() implements all the
  mentioned functionality except floating point conversions. A minimized
  version of vfprintf() is available that only implements the very basic
  integer and string conversion facilities, but only the # additional
  option can be specified using conversion flags (these flags are parsed
  correctly from the format specification, but then simply ignored).
  This version can be requested using the following compiler options:
  
  -Wl,-u,vfprintf -lprintf_min
  
  If the full functionality including the floating point conversions is
  required, the following options should be used:
  
  -Wl,-u,vfprintf -lprintf_flt -lm


(emphasis mine)

Since you are using CodeVisionAVR as we discussed in chat, they have this option built in to their configuration window as seen on Page 4, Step 9 of this tutorial: