Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2011-12-18 22:02:27

Registered: 2011-08-10
Posts: 142

speed should be in double or int or float ? ?

speed should be calculate in integer or double or float ? ??
Please tell me with reason thanks

Maths is Doctor that make our life easy .. smile smile


#2 2011-12-18 22:20:31

From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: speed should be in double or int or float ? ?


A float should be fine. I am assuming that speed is not an integer. A double is slower and uses more memory. But there might be spots where you need the extra precision. Basically you should be economical and use the smallest that you can.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.


Board footer

Powered by FluxBB