[vtk-developers] vtkMath::Ceil() and vtkMath::Floor()

Philippe Pébay pppebay at sandia.gov
Thu Jun 2 19:02:55 EDT 2011


Hello David (D)

Yes, I agree, we should. David (G) would you like to do it? Otherwise, I can.

Also, this is related to the more general question which I was asking last week, regarding how equality of FP numbers 
should be treated, consistently if possible, throughout VTK.

Philippe

On 06/02/2011 03:42 PM, David Doria wrote:
> On Thu, Jun 2, 2011 at 6:29 PM, David Gobbi<david.gobbi at gmail.com>  wrote:
>> Hi Philippe,
>>
>> The trailing bits are important in this line:
>> int g = ( x<  0 );
>> which compares the original "x" against zero.
>>
>> But the static_cast<int>(x) throws away all trailing bits on purpose,
>> the intent of the double cast is to check whether throwing away the
>> trailing bits changes the value of the double.
>>
>>   - David
>
> Would one of you add this discussion as comments in the code?
>
> David
>


-- 
Philippe Pébay
Sandia National Laboratories





More information about the vtk-developers mailing list