[EMAIL PROTECTED] writes: | En réponse à Gabriel Dos Reis <[EMAIL PROTECTED]>: | | [snip] | | > | On a more general side, please keep in mind that *signaling* NaNs are meant to | > | trap when used ("used" can be a simple copy, the standard leaves it | > | implementation-defined). | > | > They trap only when operands of arithmetic operations. | | Please. When I wrote that it "can be a simple copy" and that it is | "implementation-defined", I meant it.
Except that, copying in pratice does not trigger. What does trigger however is non-copying operation. | Computer arithmetic is my everyday work; whenever possible, I know you're completing your education at ENS Lyon you started a PhD thesis on computer arithmetic. But, just assume you're not the only person doing computer arithmetic as part his/her everyday job. | I try to avoid making things up. Here is an excerpt of | paragraph 6.2 of IEEE 754 standard: "Whether copying a signaling NaN without a | change of format signals the invalid operation exception is the implementor's | option.". I do know that paragraph. | > | If the user suddenly decides to put a signaling NaN in | > | a floating-point variable, she shouldn't be surprised if the program traps as | > | soon as it uses this variable. I don't understand why the interval library | > | should prevent such a behavior, | > | > I'm not saying the interval library should prevent that behaviour. | > I'm syaing the interval arithmetic should not provide a trapping isnan | > function. That is a different matter. | | What don't you understand in the expression "isnan is a private function"? What being private has to do with being trapping or not? | This trapping isnan function is *not* provided to the user, it is an | internal function. I understood that. | It is only used inside interval arithmetic | functions and it will make | these functions trap if given a signaling NaN argument. And I'm arguing that is a wrong behaviour. A query function isnan, be it private or super-private, should not trigger trap. -- Gaby _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost