Re: How to find minimum of two numbers.
From: Mark McIntyre (markmcintyre_at_spamcop.net)
Date: 12/10/04
- Next message: Mark McIntyre: "Re: validate pointer that was returned from malloc"
- Previous message: Jonathan Bartlett: "Re: Any C code are valid C++ code?"
- In reply to: gerard46: "Re: How to find minimum of two numbers."
- Next in thread: Bob Harris: "Re: How to find minimum of two numbers."
- Reply: Bob Harris: "Re: How to find minimum of two numbers."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 10 Dec 2004 22:35:16 +0000
On Fri, 10 Dec 2004 18:14:30 GMT, in comp.lang.c , "gerard46"
<gerard46@rtt.net> wrote:
>| No, it evaluates to zero.
>| Hint: We are talking about 1/2 == 0 (whereas 1/2.0 or 1.0/2
>| is a completely different matter ;-))
>
>Ah, I see your problem.
actually its /your/ problem... :-)
> You're assumming that I'm using a language that evaluates 1/2 to 0.
In C, this is a perfect assumption.
>Well, mine doesn't. 1/2 = 0.5
You might want consider stopping crossposting to comp.lang.c then, where
integer division cannot result in floating point results.
-- Mark McIntyre CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html> CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
- Next message: Mark McIntyre: "Re: validate pointer that was returned from malloc"
- Previous message: Jonathan Bartlett: "Re: Any C code are valid C++ code?"
- In reply to: gerard46: "Re: How to find minimum of two numbers."
- Next in thread: Bob Harris: "Re: How to find minimum of two numbers."
- Reply: Bob Harris: "Re: How to find minimum of two numbers."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|