From c178d494fb4ee3491e65a8e7c6fb2875a106f281 Mon Sep 17 00:00:00 2001 From: zeekling Date: Wed, 3 Nov 2021 21:13:46 +0800 Subject: [PATCH] add floaterr.c --- chapter3/floaterr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 chapter3/floaterr.c diff --git a/chapter3/floaterr.c b/chapter3/floaterr.c new file mode 100644 index 0000000..877b231 --- /dev/null +++ b/chapter3/floaterr.c @@ -0,0 +1,11 @@ +#include + +int main() +{ + float a, b; + b = 2.0e20 + 1.0; + a = b - 2.0e20; + printf("a = %f\n", a); + + return 0; +}