I think it is more likely an issue with line 37, since the specification for atof() indicates that the argument must be valid, otherwise you'll get undefined behavior -- which in your case is a segmentation fault.
Your code has one other significant issue: you are doing stuff with signed values. Don't do that. Use unsigned values. Again, bit manipulations are not guaranteed to be defined on signed values.
Since you are using C++, you can make your life easier by using STL algorithms. That, and I'm not sure where you are getting some of the literal values you are using to dissect a 4-byte float.