Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Obviously, this code heavily depends on the platform you compile for and run on.
- #include <iostream>
- int main()
- {
- using namespace std;
- float zero_plus = 1e-200;
- float zero_minus = -1e-200;
- cout << showpos
- << "Positive zero: " << zero_plus << endl
- << "Negative zero: " << zero_minus << endl
- << "Reciprocal of +0: " << 1/zero_plus << endl
- << "Reciprocal of -0: " << 1/zero_minus << endl
- << "Product of -0 and +0: " << zero_plus * zero_minus << endl
- << "Product of -0 and -0: " << zero_minus * zero_minus << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement