Printing floating points
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Wed Jan 27 22:49:11 UTC 2021
On Wednesday, 27 January 2021 at 17:00:36 UTC, Bruce Carneal
wrote:
> Great. Two questions: 1) Do you believe that a trivial
> domain/co-domain mapping, like those in the examples you gave,
> exists for the problem under discussion? and
Certainly trivial from a theoretical perspective, in the sense
that they are finite and therefore can be easily tabulated. If
you want a more compact form you probably should look at modular
arithmetics. You left out an important criterion, space-time
efficiency.
The inverse mapping is also not terribly complex, but first you
need to establish what you want to show. In the context of
Phobos, minimal length is of little importance, it has not impact
on correct usage. We don't have to care if the algorithm produces
more digits than necessary, so we can limit ourselves to the
inverse mapping from decimal to binary. Basically proving that we
then get the x = f⁻¹(f(x)) = id(x).
> 2) If so, do you have time to provide a proof?
Proof of what? And are you willing to pay for it?
(I suggest you drop the juvenile tone, it is annoying.)
More information about the Digitalmars-d
mailing list