From: dmr@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] c99 div and mod round toward zero
Date: Sat, 15 Apr 2006 23:48:55 -0400 [thread overview]
Message-ID: <63434bbd31db4fd6acf8dde119f66db8@plan9.bell-labs.com> (raw)
> is this [rounding to 0] fixed, or an archiitechture-dependent thing? i don't
> have a way of checking anything else.
In C89 it was allowed to vary by architecture (subject to obvious consistency
constraints). In C99 the result is well-determined, and does round to 0.
This is consistent with the usual math convention, but
in fact not necessarily best (e.g. for graphics, as Rob has pointed out).
Dennis
next reply other threads:[~2006-04-16 3:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-16 3:48 dmr [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-04-16 1:53 erik quanstrom
2006-04-16 3:15 ` Russ Cox
2006-04-16 3:56 ` geoff
2006-04-16 5:33 ` Russ Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63434bbd31db4fd6acf8dde119f66db8@plan9.bell-labs.com \
--to=dmr@plan9.bell-labs.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).