X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-math.c;h=f940a2499ccf23f8bbcb72aa94fd78b875c7be0d;hb=84e7e349505e6961cc62fded69ba277474cc3d35;hp=ec654b26010fcc497553b96fc71218d3356020eb;hpb=ca7b5b8152920d8b83da8d636207b323ca52ac2c;p=gnulib.git diff --git a/tests/test-math.c b/tests/test-math.c index ec654b260..f940a2499 100644 --- a/tests/test-math.c +++ b/tests/test-math.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,10 +40,14 @@ numeric_equal (double x, double y) } int -main () +main (void) { double d = NAN; + double zero = 0.0; if (numeric_equal (d, d)) return 1; + d = HUGE_VAL; + if (!numeric_equal (d, 1.0 / zero)) + return 1; return 0; }