delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/12/17:29:18

Date: Sat, 12 Jul 1997 14:28:59 -0700 (PDT)
Message-Id: <199707122128.OAA11766@adit.ap.net>
Mime-Version: 1.0
To: kuku AT gilberto DOT physik DOT rwth-aachen DOT de
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: math.h sin() function returns wrong value
Cc: djgpp AT delorie DOT com

You wrote:
>Also, to avoid funny results, watch out for
>places where you mix int's with doubles or floats. C doesn't
>do automatic type conversion.
Yes it does, if there is a prototype in scope. And since he #included
<math.h>, there was. This should never be a problem with an ANSI C compiler.

>So use casts in these places.
Still not a bad idea for portability to old compilers.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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