"Don" <[email protected]> writes:

> On Wednesday, 6 November 2013 at 06:28:59 UTC, Walter Bright wrote:

> Perhaps an attribute rather than a function call.
>
> double x;
> double y = x.strictfloat;
> double y = x.strictprecision;
>
> ie, (expr).strictfloat  would return expr, discarding any extra precision.
> That's the best I've come up with so far.

What about something like the following?

double x;
double y;
with (strictprecision) {
  y = x;
}

The idea being that you can create a scope within which operations are
executed with no extra precision.

Jerry

Reply via email to