[vox-tech] totally confused about C promotion

Rod Roark vox-tech@lists.lugod.org
Mon, 14 Jan 2002 15:56:08 -0800


On Monday 14 January 2002 15:46, Peter Jay Salzman wrote:
> ...
> so you're saying it's fine to pass sqrt a long double, or "it could be
> fine"?

Well it won't cause bogus results.  But (depending on your compiler 
switches) I would expect a compiler warning since you'll be losing 
precision that you might otherwise expect to have. 

It's better to cast the argument explicitly, so that anyone reading the 
code knows what's going on, and to avoid the warnings.

> also, i think i might've mispoke before.  the info docs talk about
> long double precision functions, but i'm having trouble finding them
> anywhere.  perhaps they're not implemented yet.  there's something
> called tdmath.h that i'm trying to look into right now.  can't see any
> mention of it in the glibc docs.  looking at google right now...

Dunno... depends on the library.

-- Rod
   http://www.sunsetsystems.com/