3 ms·
This all started when you said: > Floats are storage formats for approximations of numbers. Floats are, by definition, not relevant if one wants to store an ex
by haberman 11y ago
This all started when you said:
> Floats are storage formats for approximations of numbers. Floats are, by definition, not relevant if one wants to store an exact number exactly.
This is setting up a dichotomy of float=approximate, and the implied contrast is that Perl 6 rationals are exact.
Float is "by definition, not relevant if one wants to store an exact number exactly."
You didn't say "an exact rational," you said "an exact number." Your implication is that other representations are relevant if one wants to store an exact number exactly. You don't say rational, so you imply that other representations can represent an arbitrary number exactly.
If you try to advertise Perl 6 as "exact", in comparison to those messy floats, you're going to get people who are very unhappy when they find out that 2pi / 2 isn't exactly pi.
And you're also shortchanging people who use eg. JavaScript doubles as exact integer indices every day. X/1 isn't a "silly" case, integers are extremely relevant across all kinds of calculations.
People who want to truly understand this landscape need to understand the contrasts between various number representations and the pros and cons of each. No representation can represent every real number perfectly, so everyone is going to run up against inexactness in their calculations unless they know how to restrict the domain of their calculations to numbers that can be perfectly represented with their chosen number representation.
- raiph 11y ago> You didn't say "an exact rational," you said "an exact number." You were right the first time you said that. You're still right. I immediately said as much in my first response to you. I don't understand what more you could want. :< I do know what I want. I would like you to acknowledge that you are basically ignoring the direct context of my commentary, namely chubot's "0.1 can't be represented exactly [using a computer]" and natch's "wtf" about `0.1 + 0.2 == 0.3`.) > If you try to advertise Perl 6 as "exact" That would be absurd. > integers are extremely relevant across all kinds of calculations. In the context of discussing rational storage and arithmetic, integers seem to me to be primarily relevant to the extent one is talking of numerators and denominators and primarily irrelevant to the extent one is talking about floats. Do you disagree? > People who want to truly understand this landscape need to understand the contrasts between various number representations and the pros and cons of each. Sure. But one has to start somewhere within a confusing landscape and try not to get lost by paying attention to details that don't yet matter. In this case natch started with the issue of exact rational calculation, chubot's wording suggested that rationals couldn't ever be stored accurately on a computer, and I tried to get floats out of the conversation until we'd cleared that confusion up. But you immediately took issue with me omitting a qualification that I thought obvious from context ("rationals"), then followed that by ignoring (afaict) my acknowledgement of your correction, and then we ended up here, with disappointingly little light shone on the very issue we both find interesting. :< Perhaps our exchange was entirely futile. Who knows? And maybe we'll meet again and do better. Here's hoping. :)