From ba8fb0e35985c743d194b9bc7dac2c0fb8ede848 Mon Sep 17 00:00:00 2001 From: Erlend Aasland Date: Fri, 30 Nov 2007 00:05:12 +0100 Subject: [PATCH] Get rid of is_inf(), and use std::isinf() instead. Define infinity_f as std::INFINITY. --- flower/offset.cc | 8 +------- flower/real.cc | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/flower/offset.cc b/flower/offset.cc index 2d361d8407..91ff41be10 100644 --- a/flower/offset.cc +++ b/flower/offset.cc @@ -19,12 +19,6 @@ Offset::to_string () const } #endif -bool -is_inf (Real r) -{ - return (fabs (r) > 1e20); -} - /* free bsd fix by John Galbraith */ @@ -33,7 +27,7 @@ Offset complex_multiply (Offset z1, Offset z2) { Offset z; - if (!is_inf (z2[Y_AXIS])) + if (!isinf (z2[Y_AXIS])) { z[X_AXIS] = z1[X_AXIS] * z2[X_AXIS] - z1[Y_AXIS] * z2[Y_AXIS]; z[Y_AXIS] = z1[X_AXIS] * z2[Y_AXIS] + z1[Y_AXIS] * z2[X_AXIS]; diff --git a/flower/real.cc b/flower/real.cc index 9d880ac929..297f278531 100644 --- a/flower/real.cc +++ b/flower/real.cc @@ -3,4 +3,4 @@ #include using namespace std; -const Real infinity_f = HUGE_VAL; +const Real infinity_f = INFINITY; -- 2.39.5