[Gridflow-dev] cv.Div, cv.Mul + errors
Mathieu Bouchard
matju at artengine.ca
Thu Oct 25 14:50:51 EDT 2007
On Wed, 24 Oct 2007, Alexandre Castonguay wrote:
> Thanks for the fix : [cv.Div] and [cv.Mul] work now. I tried comparing
> the results of [cv.Div] with [# div] and [# /] and their results are not
> exactly the same as they both round down and [cv.Div] rounds up.
[# /] rounds towards zero, which is up for negative values.
[# div] is the one that always rounds downwards. (I said it the other way
around yesterday). Also, [# >>] always rounds downwards too.
[cv.Div] adds half of the divisor and rounds downwards. Overall, it rounds
to the nearest, up or down.
For floats there is essentially no difference, as there is no integer
rounding.
> Also, once an error has been triggered by sending a grid of different
> dimensions, GridFlow seems unable to recover.
It seems that the error handler doesn't work properly. I will replacing
RAISE() by a post() later. However, the error messages provided by CV are
not adequate, so instead I will prevent CV errors by preemptively raising
GF errors instead, and then the error handler issue is moot.
> Re-creating the object that triggered the error or closing the patch
> doesn't help.
Yow. That's quite hardcore. I don't know how this can be, but I have to
assume that it is because RAISE() is not compatible with CV error handlers
at all.
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
More information about the Gridflow-dev
mailing list