Tip: Use Doubles for time ratios

BlitzMax Forums/BlitzMax Programming/Tip: Use Doubles for time ratios

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Dreamora: I didn't 100% follow that. Why is MyConst different from MyInt if both start as Integers? Why should the results be different? Try this

Const MyConst:Int = 43251254
Print "const =" + Double(MyConst/5.0)
Local MyInt:Int = 43251254
Print "Int   =" + Double(MyInt/5.0)

my output:
const =8650251.0000000000
Int   =8650250.8000000007


Floyd: It might be fine for normal delta timing code, but the way my fixed logic code works, it isn't fine. Doubles are needed. Also surely doubles are slower than floats or can modern non-64bit CPUS handle both at the same speed?