[Cfp-interest] Berkeley feedback

David Hough CFP pcfp at oakapple.net
Fri May 23 14:21:03 PDT 2014


I talked about my ideas for alternate exception handling yesterday at
Berkeley.    I'd say that the main feedback, especially from Kahan, is that
the macro syntax is too complicated.    Others pointed out that nested
macros will look especially unattractive.     And the pragma syntax
isn't much better.

Kahan was particularly adamant that some kind of presubstitution mechanism
be available, particularly because, lacking explicit branches, it made
automated (and perhaps manual) theorem proving more tractable.

We agreed that the continued fraction with derivative example was not a
very compelling argument for presubstitution, because the presubstituted
value changes in the inner loop, and it's very doubtful that any
presubstitution mechanism can be as fast as conditional branches
on operands or results in the source code, especially if they get 
compiled into correctly-predicted branches or conditional moves. 

One of the other attendees pointed out that the continued fraction example
is a good candidate for executing the entire loop under FP_EXCEPTIONAL
as if no invalid would occur, and then interrupting and recomputing more
carefully in the infrequent occasions when invalid does occur.
That corresponds to the way I imagine FP_EXCEPTIONAL could be applied
to the dnrm2 problem, although Kahan has another algorithm for dnrm2
that is supposed to be avoid exceptions and only invoke scaling if
necessary.




More information about the Cfp-interest mailing list