× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Wed, Feb 12, 2020 at 10:30 AM <dlclark@xxxxxxxxxxxxxxxx> wrote:

EVAL(h) should do that. However, this may be considered overkill,
but I created a service procedure to give us complete flexibility in
rounding.

This is the kind of thing that I think is fun in programming, and no
doubt you enjoyed writing it.

I wonder if you could extend it so that it provides *real world*
flexibility. The kind of flexibility you've described, where you
choose a single break point above which everything rounds up, is
actually not one that I have ever heard of anyone needing.

What many people in the real world *do* need is the ability to round
toward even. That is, 1.5 rounds to 2.0, but 4.5 rounds to 4.0. (It's
much less common to want to round toward odd, but maybe that's
something that ought to provided if round-toward-even is provided,
because "why not?". And for symmetry.)

You can read about the many established rounding methods on Wikipedia:

https://en.wikipedia.org/wiki/Rounding

The other major axis of useful flexibility is allowing the choice of
always rounding toward (or always away from) positive infinity, or
always rounding away from (or always toward) zero.

The Wikipedia entry details several more rounding methods.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.