| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0001158 | VTK | (No Category) | public | 2004-09-13 11:12 | 2013-04-05 19:56 | ||||
| Reporter | ovi | ||||||||
| Assigned To | Lisa Avila | ||||||||
| Priority | urgent | Severity | major | Reproducibility | always | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0001158: vtkFloorFuncMacro produces incorrect results on i386 | ||||||||
| Description | In file Rendering/vtkVolumeRayCastMapper.h there is a function named vtkFloorFuncMacro. This function does not produce correct results for all inputs on a platform that does not use the "quick-and-dirty" solution: inline int vtkFloorFuncMacro(double x) { #if defined i386 || defined _M_IX86 double tempval; // use 52-bit precision of IEEE double to round (x - 0.25) to // the nearest multiple of 0.5, according to prevailing rounding // mode which is IEEE round-to-nearest,even tempval = (x - 0.25) + 3377699720527872.0; // (2**51)*1.5 // extract mantissa, use shift to divide by 2 and hence get rid // of the bit that gets messed up because the FPU uses // round-to-nearest,even mode instead of round-to-nearest,+infinity return ((int*)&tempval)[0] >> 1; #else // quick-and-dirty, assumes x >= 0 return (int)(x); #endif } As an example take vtkFloorFuncMacro(0.99989) which should return 0. Instead it returns 1, which is wrong. Because of failures like this, volume rendering that uses vtkVolumeRayCastMapper can produce random crashes. After I replaced the body of this function with the standard "floor(x)" all the random crashes I experienced before are gone. | ||||||||
| Tags | No tags attached. | ||||||||
| Project | |||||||||
| Type | |||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0001961) Chris Volpe (reporter) 2005-01-21 14:47 |
I just checked in a fix to this. The fix consists of a new class, vtkFastNumericConversion, in Common, and some small mods to vtkVolumeRayCastMapper. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
| 2013-04-05 19:56 | Berk Geveci | Status | customer review => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |