Real numbers are stored as floating-point numbers. floating-point arithmetic is not exact: The value of the number is stored as a significant number of fixed digits, and an exponent of fixed digits.
When you try to print a floating-point value as a string, the number is formatted in "decimal-real-number" format. For this formatting, the value of the number is rounded (You want a representation with certain precission, not infinite digits).
Because of this formatting, what you see as "-0.1667" its really the rounded form of the real value. The other notation, -1.572218e+26 , is much similar to the true floating-point representation.
I supposed that when you talk about "-0.1667", you are talking about the original value you printed to the file. But -1.667 is the value that you see when outputs the value of the variable (on the console, for example), not? This is the point: -1.667 is a rounded value. The true value is "-1.572218e+26".
You are storing the flotating-point values in a file in binary-mode, so you print in the file the real representation of the number (The binary representation). When you read the file, you read the same value that you stored before. When you puts this value in std::cout, cout prints the value, without rounding (This can be configured).
If you want rounded format, you could use setprecision to configure the format.