Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #5940

Re: File Manipulation?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.erje.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Miles Bader <miles@gnu.org>
Newsgroups comp.lang.c++
Subject Re: File Manipulation?
Date Wed, 01 Jun 2011 15:07:30 +0900
Organization NEC Electronics
Lines 18
Message-ID <buod3iy6q59.fsf@dhlpc061.dev.necel.com> (permalink)
References <c32da847-b415-4ba3-954c-e51ee8cbf5ff@e35g2000yqc.googlegroups.com> <cf251945-cabd-4db5-b76f-db411c021658@a26g2000vbo.googlegroups.com> <1bd4e783-6dbc-4eac-9255-3c8f71bedd0a@d28g2000yqf.googlegroups.com> <slrniuar53.gtj.grahn+nntp@frailea.sa.invalid>
Mime-Version 1.0
Content-Type text/plain
X-Trace individual.net f2fqdfSb2FQnMezCqdENSA+jdIZnqKM1cz4zyzQ7/cjL15RXC1
Cancel-Lock sha1:pDSqCGK5iV6af04/Z9O9Zp6HedA= sha1:YjFB8Xlcc0MWH0QfGner1Eet1gQ=
System-Type x86_64-unknown-linux-gnu
Blat Foop
Xref x330-a1.tempe.blueboxinc.net comp.lang.c++:5940

Show key headers only | View raw


Jorgen Grahn <grahn+nntp@snipabacken.se> writes:
> - you can't reliably use != on doubles

Of course one shouldn't do so blindly, but there are certainly cases
where it makes sense to use != or == on doubles.

E.g., comparison of doubles holding integral values that result from an
explicit assignment should be fine (double d = 47; .... if (d != 47) ).
This is very useful for detecting explicitly assigned out-of-band (for
the algorithm) values.

[I guess some fractional values (e.g. 0.5) should in practice also be OK
since they're exactly representable in any sane radix (2, 10, 16).]

-Miles

-- 
Consult, v.i. To seek another's disapproval of a course already decided on.

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

File Manipulation? A Moose in Love <parkstreetbooboo@gmail.com> - 2011-05-30 17:20 -0700
  Re: File Manipulation? Ian Collins <ian-news@hotmail.com> - 2011-05-31 12:24 +1200
  Re: File Manipulation? Öö Tiib <ootiib@hot.ee> - 2011-05-30 18:15 -0700
    Re: File Manipulation? A Moose in Love <parkstreetbooboo@gmail.com> - 2011-05-30 19:22 -0700
      Re: File Manipulation? Ian Collins <ian-news@hotmail.com> - 2011-05-31 14:33 +1200
        Re: File Manipulation? John Smith <bit_bucket@gmx.com> - 2011-05-30 19:57 -0700
        Re: File Manipulation? Liberian Freighter <parkstreetbooboo@gmail.com> - 2011-05-31 06:41 -0700
      Re: File Manipulation? Geoff <geoff@invalid.invalid> - 2011-05-30 19:59 -0700
      Re: File Manipulation? Geoff <geoff@invalid.invalid> - 2011-05-30 20:25 -0700
      Re: File Manipulation? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-05-31 22:33 +0000
        Re: File Manipulation? Miles Bader <miles@gnu.org> - 2011-06-01 15:07 +0900
  Re: File Manipulation? Juha Nieminen <nospam@thanks.invalid> - 2011-05-31 08:25 +0000
  Re: File Manipulation? "Fred Zwarts \(KVI\)" <F.Zwarts@KVI.nl> - 2011-05-31 16:25 +0200

csiph-web