Mat�as said:
...
> I'm deeply sorry if I came across as challenging. I didn't mean that,
> and I apologize.

no, no, no, no.  no need to apologize for anything.  implementation
questions are fine, and i really am of the opinion that the preferences and
opinions of those willing to implement solutions count for more than those
of us just interested in pushing for a particular solution.  so, that was
just my self-deprecating way of acknowledging my place in the discussion.
you'd have to do a lot more than challenge me to offend or annoy me.  only
one person on these lists has ever pulled that off.

> >> Well, then there is an alternative: Use Double arithmetic throughout,
> >> and convert Doubles to their decimal representation using the minimum
> >> quantity of digits needed to make the round-trip conversion
> >> idempotent.
> >> This is what ecvt() does in C. To put it differently, operate on
> >> doubles, but instead of calling toString() when instantiating the
> >> references, call something else that makes 2.0 appear as "2" and
> >> 2.4999999995 appear as "3.5" and so forth.
> >>
> >> Easy, simple, no run-time penalties on expressions.
> >
> > eh... didn't totally follow that.  idempotent... where are my old math
> > textbooks these days?
>
> What I mean was that Double.parse((new Wrapper(x)).toString()) == x for
> all Double x.

ah, got it now. thx.

...
> What I'm concerned over is that there is much interest in
> VTL behaving "the right way" in this issue but not much is said about
> implementing that behavior "the right way", too.

yeah, the second one is important.  but i'll have to leave that to you and
others right now.  my plate is full of higher priorities right now.  i've
said my piece concerning "VTL behaving 'the right way,'"  and there's not a
whole lot more for me to say about it (i.e. concerning implementation) at
this point.  i'd rather not just be adding to the noise (and i fear my
participation in this thread is beginning to do so).

> I begin to think that
> there's more than one way to skin a cat; we (you) could start by
> defining precisely what we would like to see in VTL and then thinking
> how to do it.

ok, one last time...  my "precise" Right Behavior (tm) suggestion is simply
to return an Integer (or Long if needed) for operations that result in a
whole number.  for those operations that do not result in a whole number,
return a Double.  no different rules for different operators and no new
operators.  in my mind, that would be the simple and intuitive solution.

in terms of "how to do it," i have thought little and will not proffer a
suggestion at this point.  sorry.

Nathan Bubna
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to