RE: [ng-spice-devel] ACS with the "free" Borland compiler


To "'ng-spice-devel@ieee.ing.uniroma1.it'" <ng-spice-devel@ieee.ing.uniroma1.it>
From "Gillespie, Alan" <Alan.Gillespie@analog.com>
Date Mon, 26 Mar 2001 10:17:22 +0100
Delivered-To mailing list ng-spice-devel@ieee.ing.uniroma1.it
Mailing-List contact ng-spice-devel-help@ieee.ing.uniroma1.it; run by ezmlm
Reply-To ng-spice-devel@ieee.ing.uniroma1.it


ACS is indeed compiling now, but I'm getting floating
point errors in that nmos100 circuit. Still investigating.

On that subject, I'm finding that my own version of spice
will handle that circuit ok on my PIII desktop machine
running WinME, but not on my Celeron with Win98. Again,
still investigating.

On the rint() function, one manual I found on the web says ->

-----------------------------------------------------------

rint(), rintf()

Round to the nearest integral value

Synopsis:

#include <math.h>

double rint ( double x );

float rintf ( float x );

Library:

libm.so

Description:

The rint() and rintf() functions return the integral value nearest x in the
direction of the current rounding mode. 

If the current rounding mode rounds toward negative infinity, then rint() is
identical to floor(). If the current rounding mode rounds toward positive
infinity, then rint() is identical to ceil(). 

Returns:

An integer (represented as a double precision number) nearest x in the
direction of the current rounding mode (IEEE754).

-----------------------------------------------------------

Whereas another one says ->

-----------------------------------------------------------

RINT(3)             Linux Programmer's Manual             RINT(3)

NAME
       rint - round to closest integer

SYNOPSIS
       #include <math.h>

       double rint(double x);

DESCRIPTION
       The rint() function rounds x to an integer value according
       to the prevalent rounding mode.  The default rounding mode
       is to round to the nearest integer.

RETURN VALUE
       The  rint() function returns the integer value as a float-
       ing-point number.

CONFORMING TO
       BSD 4.3

SEE ALSO
       abs(3), ceil(3), fabs(3), floor(3), labs(3)

------------------------------------------------------------

Is the first one a "missprint" ? That is, do they mean that
the current rounding mode applies when the fractional part
is exactly 0.5 ?

Al, what are you expecting rint() to give you ? How exactly
do you set the current rounding mode ?

Isn't C lovely for portability ;-(

Cheers,

Alan

Partial thread listing: