[vtkusers] precision problem??

Mark.Palmer at csiro.au Mark.Palmer at csiro.au
Tue Apr 13 02:55:22 EDT 2004


Hi,

I'm having a bit of trouble storing some floating point numbers with an array, a subset of the code is shown below,

vtkDoubleArray ttt$j
     ttt$j Initialize
     ttt$j SetName [lindex $VariableNames $j]
     for {set i 0} {$i < $nobs} {incr i} {
          		ttt$j InsertNextValue [set ${element}($i)] 
          		}
Now, a number such as 423747.4, then seems to end up as 423747 when i get around to extracting it from the array its stored in using something like


[ttt$j GetValue $i]


What am i doing wrong?


Mark Palmer				
Environmetrics Monitoring for Management		
CSIRO Mathematical and Information Sciences	
Private bag 5, Wembley, Western Australia, 6913			
Phone 		61-8-9333-6293
Mobile              0427-50-2353
Fax:		61-8-9333-6121
Email:		Mark.Palmer at csiro.au 
URL:		www.cmis.csiro.au/envir





More information about the vtkusers mailing list