delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/09/07/11:10:03

From: rbh AT evolving DOT com (Bob Hood)
Subject: Missing rint()?
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Wed, 7 Sep 1994 08:36:34 -0600 (MDT)

Hello, everybody,

This is my first email to the DJGPP group, so please forgive any mistakes
that might occur.

I am developing a system, and I'm using HP's Softbench C++ compiler and DJGPP
on MS-DOS (simply for the convenience of developing it both at work and at
home).  I've recently added code that suddenly broke my DJGPP compile, but
yet, it appears that it shouldn't have.

I added the following lines of code for performing accurate floating point
comparisons:
                ...
                v1 *= multiplier;
                v2 *= multiplier;
                v1 = rint(v1);
                v2 = rint(v2);
                ...

This compiles fine under HP-UX, but the link phase under DJGPP fails with
"unresolved symbol" errors.  However, when I looked in <math.h>, this function
was defined!  I went to another UNIX machine where I have GCC/G++ installed,
and this function appears to be available under this distribution.  I began
scouring the libraries provided with DJGPP, and even grabbed and looked
through the library source, but I cannot locate this function (nor others,
such as lgamma()).

Am I just missing a library, or are these functions simply missing from
DJ's port?  If it is missing from the port, why (oh, why) is it prototyped
in <math.h>, thus allowing my compile to succeed?

Please send responses to rbh AT evolving DOT com, and thanks for your replies in
advanced.

Regards,                           \\/// 
Bob                               `(o o)' 
-------------------------------oOO--(_)--OOo-------------------------------
Bob Hood            | C++:  The language where  |       rhood AT nyx DOT cs DOT du DOT edu
Home: 303-980-8392  | only friends can access   |   rbh AT evolving DOT com (BARS)
Work: 303-689-[2409]| your private members...   | 72672 DOT 3244 AT compuserve DOT com
---------------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019