Why don't we switch to C like floating pointed arithmetic instead of automatic expansion to reals?
Fool via Digitalmars-d
digitalmars-d at puremagic.com
Thu Aug 4 13:29:00 PDT 2016
On Thursday, 4 August 2016 at 20:00:14 UTC, Walter Bright wrote:
> On 8/4/2016 12:03 PM, Fool wrote:
>> How can we ensure that toFloat(toFloat(x) + toFloat(y)) does
>> not involve
>> double-rounding?
>
> It's the whole point of it.
I'm afraid, I don't understand your implementation. Isn't
toFloat(x) + toFloat(y) computed in real precision (first
rounding)? Why doesn't toFloat(toFloat(x) + toFloat(y)) involve
another rounding?
More information about the Digitalmars-d
mailing list