static char *SccsId = "@(#)func.c 4.2 (TU-Delft) 11/21/90";
/**********************************************************

Name/Version      : cldm/4.2

Language          : C
Operating system  : UNIX SYSTEM V
Host machine      : HP9000

Author(s)         : S. de Graaf
Creation date     : 14-Oct-1986
Modified by       : S. de Graaf
Modification date : 26-Jan-1987
Modification date : 21-Nov-1990


        Delft University of Technology
        Department of Electrical Engineering
        Network Theory Section
        Mekelweg 4 - P.O.Box 5031
        2600 GA DELFT
        The Netherlands

        Phone : 015 - 786234

        COPYRIGHT (C) 1987, All rights reserved
**********************************************************/
#include "extern.h"

char to_buf[20];

char *ftoa (d)
double d;
{
    sprintf (to_buf, "%.3f", d);
    return (to_buf);
}

char *itoa (i)
int i;
{
    sprintf (to_buf, "%d", i);
    return (to_buf);
}

long roundh (d)
double d;
{
    long i;
    i = (d < 0) ? (d - 0.0005) : (d + 0.9995);
    return (i);
}

long roundl (d)
double d;
{
    long i;
    i = (d < 0) ? (d - 0.9995) : (d + 0.0005);
    return (i);
}
