Index: /soft/giet_vm/Makefile
===================================================================
--- /soft/giet_vm/Makefile	(revision 791)
+++ /soft/giet_vm/Makefile	(revision 792)
@@ -130,5 +130,5 @@
                 build/libs/math/s_copysign.o   \
                 build/libs/math/s_fabs.o       \
-                build/libs/math/fmod.o       \
+                build/libs/math/fmod.o         \
                 build/libs/math/s_finite.o     \
                 build/libs/math/s_floor.o      \
Index: /soft/giet_vm/applications/rosenfeld/src/dummy_func.c
===================================================================
--- /soft/giet_vm/applications/rosenfeld/src/dummy_func.c	(revision 792)
+++ /soft/giet_vm/applications/rosenfeld/src/dummy_func.c	(revision 792)
@@ -0,0 +1,17 @@
+
+#include <stddef.h>
+#include <stdlib.h>
+
+#include "mypredef.h"
+#include "nrtype.h"
+#include "nrdef.h"
+#include "nrmacro.h"
+#include "nrkernel.h"
+
+
+
+IMAGE_EXPORT(uint8 **) LoadPGM_ui8matrix(char *filename, int *nrl, int *nrh, int *ncl, int *nch) { return NULL; }
+IMAGE_EXPORT(void) SavePGM_ui8matrix(uint8 **m, int nrl, int nrh, int ncl, int nch, char *filename) {}
+
+void write_ui8matrix_positive (uint8  **m,int i0, int i1, int j0, int j1, int iformat, char *filename) {}
+
Index: /soft/giet_vm/giet_libs/math/fmod.c
===================================================================
--- /soft/giet_vm/giet_libs/math/fmod.c	(revision 792)
+++ /soft/giet_vm/giet_libs/math/fmod.c	(revision 792)
@@ -0,0 +1,127 @@
+/*
+ *  fmod.c
+ *  cLibm
+ *
+ *     Written by Jon Okada, started on December 7th, 1992.                      
+ *     Modified by Paul Finlayson (PAF) for MathLib v2.                          
+ *     Modified by A. Sazegari (ali) for MathLib v3.                             
+ *     Modified and ported by Robert A. Murley (ram) for Mac OS X.               
+ *     Modified for cLibm, fixed a few edge cases, rewrote local_ funcs by Ian Ollmann.
+ *     Modified for armLibm, removed code to set flags as this is a soft-float fallback only.
+ *
+ *  Copyright 2007 Apple Inc. All rights reserved.
+ *
+ */
+
+#include "../math.h"
+#include "math_private.h"
+ 
+double fmod(double x, double y)
+{
+    union {
+        double d;
+        uint64_t u;
+    } ux = {x};
+    union {
+        double d;
+        uint64_t u;
+    } uy = {y};
+    
+    uint64_t absx = ux.u & ~0x8000000000000000ULL;
+    uint64_t absy = uy.u & ~0x8000000000000000ULL;
+
+    if (absx - 1ULL >= 0x7fefffffffffffffULL || absy - 1ULL >= 0x7fefffffffffffffULL) {
+        double fabsx = fabs(x);
+        double fabsy = fabs(y);
+        
+        // deal with NaN
+        if (x != x || y != y) {
+            return x + y;
+        }
+
+        // x = Inf or y = 0, return Invalid per IEEE-754
+        if (!isfinite(fabsx) || 0.0 == y) {
+            return 0.0 / 0.0; // NaN
+        }
+
+        // handle trivial case
+        if (!isfinite(fabsy) || 0.0 == x) {
+            return x;
+        }
+    }
+ 
+    if (absy >= absx) {
+        if (absy == absx) {
+            ux.u ^= absx;
+            return ux.d;
+        }
+        
+        return x;
+    }
+ 
+    int32_t expx = absx >> 52;
+    int32_t expy = absy >> 52;
+    int64_t sx = absx & 0x000fffffffffffff;
+    int64_t sy = absy & 0x000fffffffffffff;
+
+    if (0 == expx) {
+        uint32_t shift = __builtin_clzll(absx) - (64 - 53);
+        sx <<= shift;
+        expx = 1 - shift;
+    }
+
+    if (0 == expy)
+    {
+        uint32_t shift = __builtin_clzll(absy) - (64 - 53);
+        sy <<= shift;
+        expy = 1 - shift;
+    }
+    sx |= 0x0010000000000000ULL;
+    sy |= 0x0010000000000000ULL;
+
+
+    int32_t idiff = expx - expy;
+    int32_t shift = 0;
+    int64_t mask;
+    
+    do {
+        sx <<= shift;
+        idiff += ~shift;
+        sx -= sy;
+        mask = sx >> 63;
+        sx += sx;
+        sx += sy & mask;
+        shift = __builtin_clzll(sx) - (64 - 53);
+    }
+    while (idiff >= shift && sx != 0LL);
+
+    if (idiff < 0) {
+        sx += sy & mask;
+        sx >>= 1;
+        idiff = 0;
+    }
+    
+    sx <<= idiff;
+    
+    if (0 == sx) {
+        ux.u &= 0x8000000000000000;
+        return ux.d;
+    }
+    
+    shift = __builtin_clzll(sx) - (64 - 53);
+    sx <<= shift;
+    expy -= shift;
+    sx &= 0x000fffffffffffffULL;
+    sx |= ux.u & 0x8000000000000000ULL;
+    if (expy > 0) {
+        ux.u = sx | ((int64_t) expy << 52);
+        return ux.d;
+    }
+    
+    expy += 1022;
+    ux.u = sx | ((int64_t) expy << 52);
+    return ux.d * 0x1.0p-1022;
+
+}
+
+
Index: /soft/giet_vm/giet_libs/math/s_ceil.c
===================================================================
--- /soft/giet_vm/giet_libs/math/s_ceil.c	(revision 792)
+++ /soft/giet_vm/giet_libs/math/s_ceil.c	(revision 792)
@@ -0,0 +1,93 @@
+/* @(#)s_ceil.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+
+/*
+ * ceil(x)
+ * Return x rounded toward -inf to integral value
+ * Method:
+ *  Bit twiddling.
+ * Exception:
+ *  Inexact flag raised if x not equal to ceil(x).
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+static const double huge = 1.0e300;
+
+double ceil(double x)
+{
+    int32_t i0, i1, j0;
+    uint32_t i, j;
+    EXTRACT_WORDS(i0, i1, x);
+    j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
+    if (j0 < 20) {
+        if (j0 < 0) {  /* raise inexact if x != 0 */
+            if (huge + x > 0.0) {/* return 0*sign(x) if |x|<1 */
+                if (i0 < 0) {
+                    i0 = 0x80000000;
+                    i1 = 0;
+                }
+                else if ((i0 | i1) != 0) {
+                    i0 = 0x3ff00000;
+                    i1 = 0;
+                }
+            }
+        }
+        else {
+            i = (0x000fffff) >> j0;
+            if (((i0 & i) | i1) == 0) {
+                return x; /* x is integral */
+            }
+            if (huge + x > 0.0) {    /* raise inexact flag */
+                if (i0 > 0) {
+                    i0 += (0x00100000) >> j0;
+                }
+                i0 &= (~i);
+                i1 = 0;
+            }
+        }
+    }
+    else if (j0 > 51) {
+        if (j0 == 0x400) {
+            return x + x;   /* inf or NaN */
+        }
+        else {
+            return x;      /* x is integral */
+        }
+    }
+    else {
+        i = ((uint32_t) (0xffffffff)) >> (j0 - 20);
+        if ((i1 & i) == 0) {
+            return x; /* x is integral */
+        }
+        if (huge + x > 0.0) {        /* raise inexact flag */
+            if (i0 > 0) {
+                if (j0 == 20) {
+                    i0 += 1;
+                }
+                else {
+                    j = i1 + (1 << (52 - j0));
+                    if (j < i1) {
+                        i0 += 1; /* got a carry */
+                    }
+                    i1 = j;
+                }
+            }
+            i1 &= (~i);
+        }
+    }
+    INSERT_WORDS(x, i0, i1);
+    return x;
+}
+
