[std-interval] Out-of-domain behavior

Gabriel Dos Reis gdr at integrable-solutions.net
Mon Oct 9 21:08:02 PDT 2006

Guillaume Melquiond <guillaume.melquiond at ens-lyon.fr> writes:


| So the two solutions we are left with are:
| 1. Using an explicit parameter:
| interval my_function(interval x, interval y, bool &f)
| { return divide(sqrt(x, f), 1. + sqrt(asin(x) + y, f), f); }
| 2. Using an implicit (global) parameter:
| interval my_function(interval x, interval y)
| { return sqrt(x) / (1. + sqrt(asin(x) + y)); }
| The first solution has a clean semantic and it is vendor-friendly, as
| there is no side effect. The second solution is user-friendly, as it is
| more readable, less error-prone (have you noticed the mistake in the
| first version of my_function?), and probably more efficient.

In fact, my objection to global flags is precisely that it is NOT

I believe framing the issue in terms of vendor-friendly
vs. user-friendly is not accurate enough to get us on track.

-- Gaby

More information about the Std-interval mailing list