[...]
How would you do calculations involving compound interest payments
without floating-point arithmetic? And why would you want to?
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
In my personal coding style there's usually always a space.
Then you're objectively wrong.
(I kid, I kid!)
How would you do calculations involving compound interest payments
without floating-point arithmetic?
And why would you want to?
On 2026-10-30 00:56, Keith Thompson wrote:
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
Note: my argumentation is based on questioning the existence of 'F'.
So I'd appreciate to hear of any enlightening application cases, ones
that would be impossible when 'F' in literals wouldn't be present.
In C the word is constants, not literals.
For now.-a In the latest C2y draft, they're called literals.
Proposal:-a-a-a-a-a-a https://www.open-std.org/jtc1/sc22/wg14/www/docs/
n3189.htm
Draft standard: https://www.open-std.org/jtc1/sc22/wg14/www/docs/
n3998.pdf
(You've said before that you dislike this change.)
In any case, the term "literal" is unambiguous, even if it's not
currently used by the C standard.
Thanks for answering him. (As I'm yet again ignoring him I wouldn't
have noticed his statement.)
For other readers I remind that I'm not necessarily using C-standard
terms if there's terms common in CS existing that either appear more appropriately describing things, or if I'm generalizing facts beyond
"C".
It's noteworthy that the new C-standard draft is using that term;[*]
I didn't know that, so also thanks also for that information.
Janis
[*] May we interpret that fact as C-standard terms might eventually
converge to a more commonly accepted "beyond C standard" terminology?
(I expect no answer. - It was just some pondering aloud.)
cross@spitfire.i.gajendra.net (Dan Cross) writes:
In article <11bvqbn$3g0tj$1@dont-email.me>,
James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
On 2026-10-28 21:50, Steven G. Kargl wrote:
On Wed, 28 Oct 2026 17:59:19 -0700, Tim Rentsch wrote:
"Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> writes:
On Wed, 28 Oct 2026 16:39:00 -0700, Keith Thompson wrote:
(Also, you misspelled "ROFL", and you don't need parentheses on the >>>>>>> return statement, particularly if you dislike fluff.)
Yeah, I was laugh too hard while typing ;-)
Parentheses is a habit from BSD kernel source file style guide.
Now is a good time to start unlearning that habit.
Why? What harm do the parentheses cause?
They can lead to people thinking that return is a function, even if they >>> nominally know better.
What? This is an incredibly weak argument.
If someone thought that `return` was a function, then why
wouldn't they think that `if` or `while` were also functions?
Or `sizeof`, and so on?
I agree that it's a bit of a weak argument, but I wouldn't call it
incredibly weak.
In my personal coding style, I try to avoid making things that are not function calls look like function calls. In a function call, there's no space between the function name and the left parenthesis. I don't use
that style for anything other than function calls (or invocations of function-like macros). Not because I don't know return and sizeof are keywords, but because it's just a little bit easier to read the code
if distinctions like that are clear.
Examples:
func(42); // function call, or maybe a macro invocation
return 42; // not return(42); or even "return (42);
if (cond) // not if(cond)
sizeof (int) // not sizeof(int)
sizeof obj // not sizeof(obj) or sizeof (obj)
The idea is to make the code just a little bit clearer and easier to
read. If I see something that looks it would be a function call except
that the prefix is a keyword, it's *very slightly* annoying.
Parentheses on a return statement are allowed, but they're part of the expression, not part of the syntax of the return statement, and they're superfluous. I don't write `return (42);` for the same reason I don't
write `x = (42);`.
And of course *all* of these rules can be overridden by a coding
standard or by the existing style of the surrounding code.
Would there be a problem with fixed-point arithmetic (that internallyYou could make a library for rational numbers (two integers) arithmetic
uses a few more than just two decimals for rounding etc.) but that is
using basically a fixed-point representation?
Michael S <already5chosen@yahoo.com> writes:
On Wed, 28 Oct 2026 14:26:05 -0700[...]
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
David Brown <david.brown@hesbynett.no> writes:
I use the "f" suffix all the time in my code, because I do not
want double precision. In many situations, single precision
arithmetic is at least twice as fast as double precision - in
some situations it can be two orders of magnitude faster.
If you define objects as type float rather than double, do you have
examples of code where using 0.1f rather than 0.1 makes a
difference?
One simple example: These two declarations result in identical code
using gcc:
float f = 0.1f;
float f = 0.1;
David almost certainly was talking about use of 0.1f in arithmetic expressions rather than in simple initialization.
Agreed -- and I asked him for examples. (And no, didn't mean to
suggest that there are no such examples.)
And now that I've thought about it a bit more, here's a possible
example:
float f = rand(); // prevent optimization
f *= 0.1;
// f *= 0.1f;
With 0.1, f is promoted to double before being multiplied by 0.1, and
the result is converted to float. With 0.1f, double is not involved.
And in the generated x86_64 assembly from gcc, I see cvtss2sd and
cvtsd2ss when I use 0.1 that don't appear when I use 0.1f.
Both expressions *might* yield the same result (and do in the small
handful of cases I've checked), but it would take more analysis
than I'm willing to perform to prove it in all cases.
I was too quick to assume that if a compiler sees 0.1 in an expression involving float operands, it can safely treat it as 0.1f. Since 0.1
causes the usual arithmetic conversions to convert the other operand
from float to double, I was very probably wrong.
I can still imagine a compiler optimizing `f *= 0.1;` to use
float arithmetic. I wonder if there are more clear-cut examples.
I'm assuming that FLT_EVAL_METHOD==0, meaning that float expressions
are evaluated as float. If FLT_EVAL_METHOD==1, float expressions
are evaluated to the range and precision of type double.
Janis Papanagnou wrote:
Would there be a problem with fixed-point arithmetic (that internallyYou could make a library for rational numbers (two integers) arithmetic where the denominator is a power of ten. If the CPU has decimal
uses a few more than just two decimals for rounding etc.) but that is
using basically a fixed-point representation?
arithmetic, implement it in assembly.
In article <11bvqbn$3g0tj$1@dont-email.me>,
James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
[snip]
They can lead to people thinking that return is a function, even if they >>>nominally know better.
What? This is an incredibly weak argument.
If someone thought that `return` was a function, then why
wouldn't they think that `if` or `while` were also functions?
Or `sizeof`, and so on?
I agree that it's a bit of a weak argument, but I wouldn't call it
incredibly weak.
In my personal coding style, I try to avoid making things that are not >function calls look like function calls. In a function call, there's no >space between the function name and the left parenthesis. I don't use
that style for anything other than function calls (or invocations of >function-like macros). Not because I don't know return and sizeof are >keywords, but because it's just a little bit easier to read the code
if distinctions like that are clear.
[snip examples]
[snip]
The premise (at least for me) is not that someone would *think*
that return is a function, but that making a return statement not
look too much like a function call makes the code just a little
bit easier to read.
And in the example that started this subthread, I probably wouldn't
have mentioned the parentheses if the poster hadn't been complaining
about "fluff".
You could make a library for rational numbers (two integers) arithmetic where the denominator is a power of ten.
If the CPU has decimal arithmetic, implement it in assembly.
On 30/10/2026 04:38, Janis Papanagnou wrote:
On 2026-10-30 00:56, Keith Thompson wrote:
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
Note: my argumentation is based on questioning the existence of 'F'. >>>>> So I'd appreciate to hear of any enlightening application cases, ones >>>>> that would be impossible when 'F' in literals wouldn't be present.
In C the word is constants, not literals.
For now.-a In the latest C2y draft, they're called literals.
Proposal:-a-a-a-a-a-a https://www.open-std.org/jtc1/sc22/wg14/www/docs/ >>> n3189.htm
Draft standard: https://www.open-std.org/jtc1/sc22/wg14/www/docs/
n3998.pdf
(You've said before that you dislike this change.)
In any case, the term "literal" is unambiguous, even if it's not
currently used by the C standard.
Thanks for answering him. (As I'm yet again ignoring him I wouldn't
have noticed his statement.)
For other readers I remind that I'm not necessarily using C-standard
terms if there's terms common in CS existing that either appear more
appropriately describing things, or if I'm generalizing facts beyond
"C".
The preference should be to use the C standard terms in this group - or
to add brief comments for clarity.-a (Sometimes it is also worth adding comments for clarity even when using C standard terms.)-a The C standard uses terms like "object" and "byte" in a way that is unusual in the
wider scope of computer science.-a But sometimes computer science courses use different terms, as do different programming languages and different parts of the world, and things change over time - often there is no
single "standard CS" term, and often there is no fixed definition of a
term commonly used in computer science.
Many of the terms used in the C
standard have the strong advantage of having specific definitions given
in the standard itself.
If in doubt, being a little extra explicit is better than being misunderstood!
In the particular case of "constant", I think the root issue is that the word is overused.-a "integer constant" and "integer constant expression"
[snip digressions about "integer constant" and "constant expressions"]
[snip more digressions on early C-"constants"]
[...]-a C++ has called 123
an "integer literal" for ages, and it makes sense for C to follow suit.
I doubt if this is the start of a habit or pattern, however.
On 2026-10-30 01:50, Lawrence DrCOOliveiro wrote:
[...]
How would you do calculations involving compound interest payments
without floating-point arithmetic? And why would you want to?
Because what gets in and what comes out is just exact fixed point?
And you need more an exact transformation to and from the internal
values? And exact representation with BCD more than binary floating
point? (Mind the 0.10 issue!) - I think there was a reason why with
COBOL, the COmmon Business Oriented Language, there was - at least >historically - fixed-point arithmetic used for the financial sector?
(But please CMIIW.)
Would there be a problem with fixed-point arithmetic (that internally
uses a few more than just two decimals for rounding etc.) but that is
using basically a fixed-point representation?
And we saw in some post this hilarious sample of an (Amazon?) bill.
(Not that this couldn't have been fixed even/also with FP-arithmetic.)
On 2026-10-30 09:11, David Brown wrote:
On 30/10/2026 04:38, Janis Papanagnou wrote:
On 2026-10-30 00:56, Keith Thompson wrote:
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
Note: my argumentation is based on questioning the existence of 'F'. >>>>>> So I'd appreciate to hear of any enlightening application cases, ones >>>>>> that would be impossible when 'F' in literals wouldn't be present.
In C the word is constants, not literals.
For now.-a In the latest C2y draft, they're called literals.
Proposal:-a-a-a-a-a-a https://www.open-std.org/jtc1/sc22/wg14/www/docs/ >>>> n3189.htm
Draft standard: https://www.open-std.org/jtc1/sc22/wg14/www/docs/
n3998.pdf
(You've said before that you dislike this change.)
In any case, the term "literal" is unambiguous, even if it's not
currently used by the C standard.
Thanks for answering him. (As I'm yet again ignoring him I wouldn't
have noticed his statement.)
For other readers I remind that I'm not necessarily using C-standard
terms if there's terms common in CS existing that either appear more
appropriately describing things, or if I'm generalizing facts beyond
"C".
The preference should be to use the C standard terms in this group - or
Like there's no CLC coding style (as recently demanded and rebutted)
it's also, IMO, presumptuous to demand posters to use terms defined
in the C-standards documents.
Moreover, as I recently learned, even
the standard-C documents seem to adjust their terminology.
As I explained already, I'm using the terms that appear to me to be
most appropriate to describe things. In cases where there's multiple
options I'm gladly using the terms preferred in the C-standard docs,
given that I know them.
I certainly consider it presumptuous to demand from posters to read
(all or every new version of) the C-standard to talk about "C".
to add brief comments for clarity.-a (Sometimes it is also worth adding
comments for clarity even when using C standard terms.)-a The C
standard uses terms like "object" and "byte" in a way that is unusual
in the wider scope of computer science.-a But sometimes computer
science courses use different terms, as do different programming
languages and different parts of the world, and things change over
time - often there is no single "standard CS" term, and often there is
no fixed definition of a term commonly used in computer science.
That's all correct.
As I mentioned elsewhere already - I think also in a reply to a post
of yours, about the same topic - I'm gladly explaining (if necessary)
not only every word in my posts that are unclear to you but also the
implied semantics if necessary.
(Mind that, as opposed to you and some others, while you may do that,
I'm *not* discussing the _C-standard_ here. You should make yourself
clear that there's a difference between talking about all aspects of
the language or exchange specifically about the formal aspects of "C".
What makes perfectly sense for the former group is, to say the least, arguable for the general, non-specialized disputants.)
Many of the terms used in the C standard have the strong advantage of
having specific definitions given in the standard itself.
Fine.
If in doubt, being a little extra explicit is better than being
misunderstood!
No doubt.
In the particular case of "constant", I think the root issue is that
the word is overused.-a "integer constant" and "integer constant
expression"
I think in the post you are referring to I described a different thing;
I spoke about a constant literal. And the (IMO unnecessary) dispute had
been about "literal" not about "constant". - And we heard that "literal"
is even the new term used in the (draft) C-standard!
[snip digressions about "integer constant" and "constant expressions"]
[snip more digressions on early C-"constants"]
[...]-a C++ has called 123 an "integer literal" for ages, and it makes
sense for C to follow suit.
Yes, and I agree with that choice. (I'm using the word "literal" for all programming languages if I want to talk about literals.)
I doubt if this is the start of a habit or pattern, however.
I think it's pointless to make guesses. (I'm certainly continuing to
use those terms that I think are best fitting. And if you (or others)
have problems understanding them I'm gladly explaining them, as said. Especially since I think the time spent on an explanation of a good
term is much better spent than the time wasted for a discussion like
the one you restarted here yet another time.)
Janis
On 30/10/2026 14:54, Janis Papanagnou wrote:
[snip]
it's also, IMO, presumptuous to demand posters to use terms defined
in the C-standards documents.
"Demand" is far too strong a word. It is not presumptuous or onerous to >/prefer/ standard terms for a given language in a language-specific
Usenet group. Discussing what is and is not supported and required by
the C standards is par for the course in comp.lang.c, and understanding
the standard terms is an important part of that. We don't need to be >obsessive about it unless it is an important detail of the issue being >discussed, as long things are clear enough.
All the early electrodata/burroughs business computers (Datatron 220, Burroughs B300, Burroughs B3500) used fixed point BCD representations
for business applications and the COBOL compiler.
On 30/10/2026 10:39, chine.bleu wrote:
Janis Papanagnou wrote:
Would there be a problem with fixed-point arithmetic (that internallyYou could make a library for rational numbers (two integers)
uses a few more than just two decimals for rounding etc.) but that is
using basically a fixed-point representation?
arithmetic where the denominator is a power of ten. If the CPU has
decimal arithmetic, implement it in assembly.
It does not make much sense to talk about a library for rational
numbers, then restrict it to denominators with powers of ten.-a When you need exactly reproducible decimals, one option is to use a fixed number
of places and then used scaled integers (a.k.a. fixed-point arithmetic)
- basically hold your values in "long long int" types with a constant
scale factor of 1'000'000, or similar.
If you want to be able to handle different scale factors easily, then decimal floating point formats are appropriate.-a These are standardised
in ISO/IEC 60559, and supported in C as _Decimal32, _Decimal64 and _Decimal128.-a The types are optional in C, but supported at least by gcc
on "big" target systems.-a If the target hardware has appropriate instructions for them, the compiler should use that - that is vastly
better than using assembly.
It is certainly the case that there are times when detailed[...]
consideration of the exact language and terms of the standards are
important to the discussion, and plenty of times when they are not. I
have nothing against loser language when loser language is easier to
use for the point at hand.
David Brown <david.brown@hesbynett.no> writes:
[...]
It is certainly the case that there are times when detailed[...]
consideration of the exact language and terms of the standards are
important to the discussion, and plenty of times when they are not. I
have nothing against loser language when loser language is easier to
use for the point at hand.
That sounded a lot harsher than you intended until I realized you had misspelled "looser".
if ai generates me some functions it puts everywhere this f at the and
yet it add zeros so instead of .1 i got 0.1f
and i obviously dont like it
i write hvever some codes when i need speed so the question is may it
give some difference?
i mean .1 maybe can be treated as doube constants so mabe occupies some
more memory (?) or uses some casting in coplutations (?)
i doubt it probably it makes difference but im strictly not sure
On 10/27/2026 5:53 AM, fir wrote:
if ai generates me some functions it puts everywhere this f at the and
yet it add zeros so instead of .1 i got 0.1f
and i obviously dont like it
i write hvever some codes when i need speed so the question is may it
give some difference?
i mean .1 maybe can be treated as doube constants so mabe occupies
some more memory (?) or uses some casting in coplutations (?)
i doubt it probably it makes difference but im strictly not sure
Never give up precision easily.-a It will always come back to bite you.
Lynn
On 10/30/2026 10:00 PM, Lynn McGuire wrote:
On 10/27/2026 5:53 AM, fir wrote:
if ai generates me some functions it puts everywhere this f at the and
yet it add zeros so instead of .1 i got 0.1f
and i obviously dont like it
i write hvever some codes when i need speed so the question is may it give some difference?
i mean .1 maybe can be treated as doube constants so mabe occupies some more memory (?) or uses some casting in coplutations (?)
i doubt it probably it makes difference but im strictly not sure
Never give up precision easily.-a It will always come back to bite you.
Lynn
Tell the AI to stop the nonsense.
Lynn
On Fri, 10/30/2026 11:01 PM, Lynn McGuire wrote:
On 10/30/2026 10:00 PM, Lynn McGuire wrote:
On 10/27/2026 5:53 AM, fir wrote:
if ai generates me some functions it puts everywhere this f at the and >>>> yet it add zeros so instead of .1 i got 0.1f
and i obviously dont like it
i write hvever some codes when i need speed so the question is may it give some difference?
i mean .1 maybe can be treated as doube constants so mabe occupies some more memory (?) or uses some casting in coplutations (?)
i doubt it probably it makes difference but im strictly not sure
Never give up precision easily.-a It will always come back to bite you.
Lynn
Tell the AI to stop the nonsense.
Lynn
You can do that. The trick to being a vibe coder,
is knowing what to put in the prompt.
And this is why, even if you have "negative interest" in LLM-AI,
you should at least do enough experiments to detect their dimensionality (their linear thinking when used in isolation and without
a harness).
There is a big big difference, between what Fir is doing,
and what professionals right now are doing.
[Teaser]
https://www.theregister.com/devops/2026/09/18/microsoft-agentically-ports-copilot-runtime-to-rust-for-120k/5297549
[Details]
https://github.blog/ai-and-ml/generative-ai/migrating-the-github-copilot-runtime-to-rust-using-copilot/
On the one hand, the $120,000 worth of tokens, seems expensive. But
on the other hand, the staff it would have taken to do the equivalent
would not have been free.
Even an expert, he still made a mistake in corralling the machines
and preventing them from "cheating". The non-determinism means
you can never stop learning about what guard statements to add.
The code review is still the bottleneck, and lots of operations outside
of Microsoft, do not see the gains of the "all-in" "experimental"
approach shown in the above.
Even if you're not interested in such things, you have to track
the capabilities, to understand how your ass is going to get kicked.
For example, you may have a superior product to the upstarts vibe-coding
an equivalent. But now you are going to have to do extra marketing
to ensure your existing customers "do not run away".
The getcraft site has been making (what it claims are) equivalents
to commercial applications like the Adobe suite and Microsoft Office.
By no means are these equivalent, not even close. But what the
existence of these things do, is they lead to customers "testing
all sorts of shit" and diluting a lot of careful work you might
have done to get where you are. I tested a couple of those getcraft in
a VM, and there was "excessive CPU usage". The engine is Electron
(for cross-platform usage).
Paul
David Brown <david.brown@hesbynett.no> writes:
On 28/10/2026 21:25, Michael S wrote:[...]
I'd still likely prefer to write it as (float)0.1 instead of 0.1f.That seems a bit excessive to me, but okay. The principle is the
It somewhat depends on my mood in specific day, but likelihood is
certainly not in favor of 0.1f.
same, making it clear to the reader and the compiler that no
double-precision arithmetic is involved.
Except that, at least in the abstract machine, `(float)0.1` produces
a value of type double and converts it to float. It's likely that
a compiler would generate the same code as for `0.1f`, but I'd want
to confirm that if it mattered. (Actually, I'd just write `0.1f`.)
Paul pisze:
On Fri, 10/30/2026 11:01 PM, Lynn McGuire wrote:i wouldnt say i do-a vibe coding..i do normal coding wit a help of ai assistant..vibe coding may be something different than i do
On 10/30/2026 10:00 PM, Lynn McGuire wrote:
On 10/27/2026 5:53 AM, fir wrote:
if ai generates me some functions it puts everywhere this f at the and >>>>> yet it add zeros so instead of .1 i got 0.1f
and i obviously dont like it
i write hvever some codes when i need speed so the question is may
it give some difference?
i mean .1 maybe can be treated as doube constants so mabe occupies
some more memory (?) or uses some casting in coplutations (?)
i doubt it probably it makes difference but im strictly not sure
Never give up precision easily.-a It will always come back to bite you. >>>>
Lynn
Tell the AI to stop the nonsense.
Lynn
You can do that. The trick to being a vibe coder,
is knowing what to put in the prompt.
And this is why, even if you have "negative interest" in LLM-AI,
you should at least do enough experiments to detect their dimensionality
(their linear thinking when used in isolation and without
a harness).
There is a big big difference, between what Fir is doing,
and what professionals right now are doing.
-a-a [Teaser]
-a-a-a https://www.theregister.com/devops/2026/09/18/microsoft-
agentically-ports-copilot-runtime-to-rust-for-120k/5297549
-a-a [Details]
-a-a-a https://github.blog/ai-and-ml/generative-ai/migrating-the-github-
copilot-runtime-to-rust-using-copilot/
On the one hand, the $120,000 worth of tokens, seems expensive. But
on the other hand, the staff it would have taken to do the equivalent
would not have been free.
Even an expert, he still made a mistake in corralling the machines
and preventing them from "cheating". The non-determinism means
you can never stop learning about what guard statements to add.
The code review is still the bottleneck, and lots of operations outside
of Microsoft, do not see the gains of the "all-in" "experimental"
approach shown in the above.
Even if you're not interested in such things, you have to track
the capabilities, to understand how your ass is going to get kicked.
For example, you may have a superior product to the upstarts vibe-coding
an equivalent. But now you are going to have to do extra marketing
to ensure your existing customers "do not run away".
The getcraft site has been making (what it claims are) equivalents
to commercial applications like the Adobe suite and Microsoft Office.
By no means are these equivalent, not even close. But what the
existence of these things do, is they lead to customers "testing
all sorts of shit" and diluting a lot of careful work you might
have done to get where you are. I tested a couple of those getcraft in
a VM, and there was "excessive CPU usage". The engine is Electron
(for cross-platform usage).
-a-a-a Paul
On 10/31/2026 12:30 AM, fir wrote:
Paul pisze:
On Fri, 10/30/2026 11:01 PM, Lynn McGuire wrote:i wouldnt say i do-a vibe coding..i do normal coding wit a help of ai
On 10/30/2026 10:00 PM, Lynn McGuire wrote:
On 10/27/2026 5:53 AM, fir wrote:
if ai generates me some functions it puts everywhere this f at the >>>>>> and
yet it add zeros so instead of .1 i got 0.1f
and i obviously dont like it
i write hvever some codes when i need speed so the question is may >>>>>> it give some difference?
i mean .1 maybe can be treated as doube constants so mabe occupies >>>>>> some more memory (?) or uses some casting in coplutations (?)
i doubt it probably it makes difference but im strictly not sure
Never give up precision easily.-a It will always come back to bite you. >>>>>
Lynn
Tell the AI to stop the nonsense.
Lynn
You can do that. The trick to being a vibe coder,
is knowing what to put in the prompt.
And this is why, even if you have "negative interest" in LLM-AI,
you should at least do enough experiments to detect their dimensionality >>> (their linear thinking when used in isolation and without
a harness).
There is a big big difference, between what Fir is doing,
and what professionals right now are doing.
-a-a [Teaser]
-a-a-a https://www.theregister.com/devops/2026/09/18/microsoft-
agentically-ports-copilot-runtime-to-rust-for-120k/5297549
-a-a [Details]
-a-a-a https://github.blog/ai-and-ml/generative-ai/migrating-the-github- >>> copilot-runtime-to-rust-using-copilot/
On the one hand, the $120,000 worth of tokens, seems expensive. But
on the other hand, the staff it would have taken to do the equivalent
would not have been free.
Even an expert, he still made a mistake in corralling the machines
and preventing them from "cheating". The non-determinism means
you can never stop learning about what guard statements to add.
The code review is still the bottleneck, and lots of operations outside
of Microsoft, do not see the gains of the "all-in" "experimental"
approach shown in the above.
Even if you're not interested in such things, you have to track
the capabilities, to understand how your ass is going to get kicked.
For example, you may have a superior product to the upstarts vibe-coding >>> an equivalent. But now you are going to have to do extra marketing
to ensure your existing customers "do not run away".
The getcraft site has been making (what it claims are) equivalents
to commercial applications like the Adobe suite and Microsoft Office.
By no means are these equivalent, not even close. But what the
existence of these things do, is they lead to customers "testing
all sorts of shit" and diluting a lot of careful work you might
have done to get where you are. I tested a couple of those getcraft in
a VM, and there was "excessive CPU usage". The engine is Electron
(for cross-platform usage).
-a-a-a Paul
assistant..vibe coding may be something different than i do
At least you don't let do all of your coding.
On 2026-10-29 20:49, Dan Cross wrote:
[...]
But again, the whole premise (that a programmer familiar with C>> would ever think that `return` is a function) is silly.
Yes, that's hard to believe.
On 2010-08-28, Tony Clough wrote that "One possible problem with C
as compared to other languages like Perl or Shell is that function
calls require parentheses which leads to cluttered code. (But there
are some funny exceptions in the standard library though, eg return
and size_of do not need parentheses)"
On Sun, 1 Nov 2026 17:15:23 -0500, James Kuyper wrote:
On 2010-08-28, Tony Clough wrote that "One possible problem with C
as compared to other languages like Perl or Shell is that function
calls require parentheses which leads to cluttered code. (But there
are some funny exceptions in the standard library though, eg return
and size_of do not need parentheses)"
sizeof does require parentheses if you pass it a type, not for an
expression (except for the usual precedence reasons).
Not sure why that is ...
On Wed, 28 Oct 2026 16:05:06 -0700"The accuracy of the floating-point operations (+, -, *, /) and of most
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
I was too quick to assume that if a compiler sees 0.1 in an expression
involving float operands, it can safely treat it as 0.1f. Since 0.1
causes the usual arithmetic conversions to convert the other operand
from float to double, I was very probably wrong.
I can still imagine a compiler optimizing `f *= 0.1;` to use
float arithmetic. I wonder if there are more clear-cut examples.
I don't know what exactly is allowed by the Standard (that is, I know
what's written, I don't know how peoples with lowyers attitude can
interpret it), ...
... but will be extremely surprised if any "major" compilerOne way to get stronger requirements is to require that
is doing such optimization on IEEE-754 compliant platform in absence of non-compliance flags like fast-math.
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
On Sun, 1 Nov 2026 17:15:23 -0500, James Kuyper wrote:
On 2010-08-28, Tony Clough wrote that "One possible problem with C
as compared to other languages like Perl or Shell is that function
calls require parentheses which leads to cluttered code. (But there
are some funny exceptions in the standard library though, eg return
and size_of do not need parentheses)"
sizeof does require parentheses if you pass it a type, not for an
expression (except for the usual precedence reasons).
Not sure why that is ...
Because if parentheses were not required around the type name, it would result in ambiguities. (I don't have an example off the top of my
head.)
but the question is: can using .1 instead of 0.1f make me any harm inYou might get a warning because of the precision loss.
code? ...
Total
75.71000000000001 USD
Appears they may be using FP instead of integer fixed point arithmetic
for pricing.
Am 27.10.2026 um 19:40 schrieb Scott Lurndal:
Total
75.71000000000001 USD
Appears they may be using FP instead of integer fixed point arithmetic
for pricing.
If you have a proper fp to decimal runtime function this actually
won't happen. That's while numbers which would result in the above
output would always be rounded correctly. That's safe since you'd
need billions of computations that wouldn't result to such results
by accident.
If you have a proper fp to decimal runtime function this actually
won't happen.
On 2026-10-29 17:55, Janis Papanagnou wrote:
On 2026-10-29 20:49, Dan Cross wrote:
[...]
But again, the whole premise (that a programmer familiar with C
would ever think that `return` is a function) is silly.
Agreed. The misconception is far more common among those
who aren't very familiar with C.
Yes, that's hard to believe.
See
It's not, by any means, a common misconception, but it does occur.
In article <11c8dls$2chr0$1@dont-email.me>,
James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
On 2026-10-29 17:55, Janis Papanagnou wrote:
On 2026-10-29 20:49, Dan Cross wrote:
[...]
But again, the whole premise (that a programmer familiar with C
would ever think that `return` is a function) is silly.
Agreed. The misconception is far more common among those
who aren't very familiar with C.
It is not common at all.
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
David Brown <david.brown@hesbynett.no> writes:
On 28/10/2026 21:25, Michael S wrote:
[...]
I'd still likely prefer to write it as (float)0.1 instead of 0.1f.
It somewhat depends on my mood in specific day, but likelihood is
certainly not in favor of 0.1f.
That seems a bit excessive to me, but okay. The principle is the
same, making it clear to the reader and the compiler that no
double-precision arithmetic is involved.
Except that, at least in the abstract machine, `(float)0.1` produces
a value of type double and converts it to float. It's likely that
a compiler would generate the same code as for `0.1f`, but I'd want
to confirm that if it mattered. (Actually, I'd just write `0.1f`.)
Maybe the code will be the same. But in general going via doubles
produces less accurate result, [...]
antispam@fricas.org (Waldek Hebisch) writes:
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
David Brown <david.brown@hesbynett.no> writes:
On 28/10/2026 21:25, Michael S wrote:
[...]
I'd still likely prefer to write it as (float)0.1 instead of 0.1f.
It somewhat depends on my mood in specific day, but likelihood is
certainly not in favor of 0.1f.
That seems a bit excessive to me, but okay. The principle is the
same, making it clear to the reader and the compiler that no
double-precision arithmetic is involved.
Except that, at least in the abstract machine, `(float)0.1` produces
a value of type double and converts it to float. It's likely that
a compiler would generate the same code as for `0.1f`, but I'd want
to confirm that if it mattered. (Actually, I'd just write `0.1f`.)
Maybe the code will be the same. But in general going via doubles
produces less accurate result, [...]
What makes you think using a double will produce a less accurate
result?
On 2026-11-03, Dan Cross <cross@spitfire.i.gajendra.net> wrote:
In article <11c8dls$2chr0$1@dont-email.me>,
James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
On 2026-10-29 17:55, Janis Papanagnou wrote:
On 2026-10-29 20:49, Dan Cross wrote:
[...]
But again, the whole premise (that a programmer familiar with C
would ever think that `return` is a function) is silly.
Agreed. The misconception is far more common among those
who aren't very familiar with C.
It is not common at all.
You have to get to a certain advanced level of education in computer
science before you start believing that returning is another function
calls.
But it's there. The returning control flow can be modeled by
continuations.
On 28/10/2026 22:34, Chris M. Thomasson wrote:
On 10/28/2026 12:39 AM, David Brown wrote:
On 28/10/2026 01:49, Lawrence DrCOOliveiro wrote:
On Tue, 27 Oct 2026 18:06:25 -0400, James Kuyper wrote:
However, if you need double precision, you shouldn't be using the
"f" suffix.
Is there any situation where you *should* use the rCLfrCY suffix?
I am thinking: no.
Try thinking harder.
I use the "f" suffix all the time in my code, because I do not want
double precision.-a In many situations, single precision arithmetic is
at least twice as fast as double precision - in some situations it
can be two orders of magnitude faster.
Same here. I am mostly creating graphics related things. double
precision in a GPU might not be there. Now, if I am doing something
that needs higher precision, tends to be with deep zooms or
granularity in a vector field, then double is okay. But I need to
beware that the shaders might not support double.
You can also see it in SIMD.-a A 128-bit SIMD register might be useable
for 4 single-precision values and parallel operations, while only 2 can
be handled for double-precision.-a Obviously details will vary by SIMD implementation, but singles are going to be at least twice as fast in general.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 57:39:33 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
4 files (9,632K bytes) |
| Messages: | 285,926 |