Article View: comp.lang.c
Article #920Re: .5 against 0.5f
From: Keith Thompson
Date: Wed, 28 Oct 2026 06:21
Date: Wed, 28 Oct 2026 06:21
33 lines
2536 bytes
2536 bytes
steve g <Sgonedes1977@gmail.com> writes:
> fir <profesor.fir@gmail.com> writes:
>> but the question is: can using .1 instead of 0.1f make me any harm in code?
>> like things get slower in runtime? (assuming i use floats in code
>> not doubles, and the code is a bit time critical like rasterisation goes on
>> floats) why the ai so maniacally puts that f?
>
> dunno, the Gnu Libc has many options for floats/doubles. You can use a
> prefix of `-' and such. check gnu libc manual on google.
fir was asking about a C language issue, nothing to do with GNU libc or
any other implementation of the C standard library.
What on Earth does "prefix of `-'" refer to?
>> i gues the answer is NOT but maybe soem can show at least one case it could be
>> worse?
>
> 12.12.10 Parsing a Template String
> ----------------------------------
>
> GNU Libc --- have fun...
That has nothing to do with the question, which was about 0.1 vs. 0.1f
in C source code. And that question has already been discussed at some
length.
I don't want to discourage you from posting, but maybe you should
concentrate on asking questions rather than trying to answer them.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Technical Details
Message-ID:
<11bs49j$2600t$1@kst.eternal-september.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!kst.eternal-september.org!.POSTED!not-for-mailReferences:
<11bpvs7$1e6kc$2@dont-email.me> <11bqnvh$1np7s$1@dont-email.me> <11bqo8h$1o2l4$2@dont-email.me> <87se1qnykx.fsf@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!kst.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson <Keith.S.Thompson+u@gmail.com> Newsgroups: comp.lang.c Subject: Re: .5 against 0.5f Date: Tue, 27 Oct 2026 23:21:39 -0700 Organization: None to speak of Lines: 33 Message-ID: <11bs49j$2600t$1@kst.eternal-september.org> References: <11bpvs7$1e6kc$2@dont-email.me> <11bqnvh$1np7s$1@dont-email.me> <11bqo8h$1o2l4$2@dont-email.me> <87se1qnykx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Wed, 28 Oct 2026 06:21:40 +0000 (UTC) Injection-Info: kst.eternal-september.org; logging-data="2293789"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/f7JN6J4lCdhJZYi+D9nYD"; posting-host="ac4e6fa4e505b2147f0d092402a060c4" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:y8z1nUHe/BNjNfqv6fD8y6QXFZQ= sha256:7ZpW5aA9i1OKbktQ8R5d3osu2zVSsl+eSJJ5DwkN5gI= sha1:+qH4EdstpFUyXVbfOB5MN+Hw63M= sha256:YUVoLSzaeqOc4Rp7iX9mejgUCuOMl6BL9aQsK8d1bYM=