891
VB and the development of wizards / Re: Mach3 script editor bug?
« on: February 09, 2013, 06:26:46 AM »
Yes, print 10/3 displays 3.3333333333333 but that does NOT mean 10/3 EQUALS 3.3333333333333. It means 10/3 equals 3.3333333333333 TO 13 DECIMAL PLACES. There's a world of difference - yes/no?.
Moving on, some questions you might want to ask yourself.
What initial values of BaseX are valid in YOUR program? For that set of valid numbers what does the round function do through your loop? as the numbers are processed, does it round up or down? What does it do if the number at some point ends up as EVEN with a decimal part that is exactly 0.5? what does it do when it's ODD with a 0.5 decimal part?. What does it do if the number goes negetive? Does it matter to YOUR overall program - not just that example fragment with those example numbers?
Sorry - I know you just want a one shot answer but hopefully you'll see why I think I would be wrong to give you one. Maybe someone will come along and explain it better.
and now a pause for thought... ta.twi.tudelft.nl/users/vuik/wi211/disasters.html
Ian
Moving on, some questions you might want to ask yourself.
What initial values of BaseX are valid in YOUR program? For that set of valid numbers what does the round function do through your loop? as the numbers are processed, does it round up or down? What does it do if the number at some point ends up as EVEN with a decimal part that is exactly 0.5? what does it do when it's ODD with a 0.5 decimal part?. What does it do if the number goes negetive? Does it matter to YOUR overall program - not just that example fragment with those example numbers?
Sorry - I know you just want a one shot answer but hopefully you'll see why I think I would be wrong to give you one. Maybe someone will come along and explain it better.
and now a pause for thought... ta.twi.tudelft.nl/users/vuik/wi211/disasters.html
Ian