isfinite -> finite
authorteodor <teodor>
Fri, 21 Jan 2005 17:56:06 +0000 (17:56 +0000)
committerteodor <teodor>
Fri, 21 Jan 2005 17:56:06 +0000 (17:56 +0000)
galaxy.c
menuaction.c

index 1db3522..614d8b4 100644 (file)
--- a/galaxy.c
+++ b/galaxy.c
@@ -356,7 +356,7 @@ EnergyImpulseGalaxy(Galaxy *galaxy) {
        galaxy->Impulse = sqrt(impulseX*impulseX + impulseY*impulseY + impulseZ*impulseZ);
        galaxy->Moment  = sqrt(momentX *momentX  + momentY *momentY  + momentZ *momentZ );
        galaxy->kineticEnergy = kinetic;
-       if ( !isfinite(potential) ) potential=0; 
+       if ( !finite(potential) ) potential=0; 
        galaxy->potentialEnergy = -potential;
 }
 
@@ -378,9 +378,9 @@ initLiveGalaxy(Galaxy *galaxy) {
 
 #define iszero(x)      ( fpclassify(x) & FP_ZERO )
 #define  CHK_ERRORVAL( what, err, val, prevval )                                               \
-if  ( isfinite(val) && isfinite(prevval) ) {                                                   \
+if  ( finite(val) && finite(prevval) ) {                                                       \
        err = fabs(  (val)/(prevval) - 1.0 );                                                   \
-       if ( !isfinite(err) )                                                                   \
+       if ( !finite(err) )                                                                     \
                err =  galaxy->error;                                                           \
 } else {                                                                                       \
        fprintf(stderr, "%s is not finite: val:%G prevval:%G\n", what, (val), (prevval));       \
index f9600ef..d461fbf 100644 (file)
@@ -464,7 +464,7 @@ actionRun( GtkWidget *w, gpointer   data ) {
        }
 
        for(i=0;i<XGalaxy.nentry;i++) 
-               if ( XGalaxy.entry[i].mass==0.0 || !isfinite(XGalaxy.entry[i].mass) ) {
+               if ( XGalaxy.entry[i].mass==0.0 || !finite(XGalaxy.entry[i].mass) ) {
                        GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW(XGalaxy.window),
                                   GTK_DIALOG_DESTROY_WITH_PARENT,
                                   GTK_MESSAGE_ERROR,