Double or Float?

1 visualização
Pular para a primeira mensagem não lida

Hicks, Matt

não lida,
17 de jul. de 2010, 14:42:4617/07/2010
para sgin...@googlegroups.com
Hey guys, we finally merged in simplex3d branch to default and immediately afterward I converted from Double to Float for the engine in order to better support mobile devices.  However, based on this article Lex sent me:

http://developer.android.com/guide/practices/design/performance.html#avoidfloat

It would appear in more recent hardware there's no performance difference between Double and Float.  So, I'd like to ask for some feedback on whether we should be using Double or Float for all our math?  At this point switching back to Double is a matter of going back a couple revisions so we need to make this decision once and for all.  Can anyone elaborate on additional reasons to use one over another?

Thanks,

Matt

philip

não lida,
19 de jul. de 2010, 04:00:1219/07/2010
para sgine-dev
As a C/C++ programmer, I always used double and long. never int or
float as int and float width could vary depending on the machine which
prevented portability.

On Jul 18, 2:42 am, "Hicks, Matt" <mhi...@captiveimagination.com>
wrote:
> Hey guys, we finally merged in simplex3d branch to default and immediately
> afterward I converted from Double to Float for the engine in order to better
> support mobile devices.  However, based on this article Lex sent me:
>
> http://developer.android.com/guide/practices/design/performance.html#...

Hicks, Matt

não lida,
24 de set. de 2010, 18:48:3224/09/2010
para sgin...@googlegroups.com
Well, you'll be happy to know that we're sticking with Double. ;)

On Fri, Sep 24, 2010 at 5:36 PM, Jacob Biggs <biggs...@gmail.com> wrote:
I would personally always choose Double over Float, since the
performance is negligible and the extra precision is never
detrimental! Especially when precision really matters.

On Jul 17, 12:42 pm, "Hicks, Matt" <mhi...@captiveimagination.com>

wrote:
> Hey guys, we finally merged in simplex3d branch to default and immediately
> afterward I converted from Double to Float for the engine in order to better
> support mobile devices.  However, based on this article Lex sent me:
>

Jacob Biggs

não lida,
24 de set. de 2010, 19:34:3524/09/2010
para sgin...@googlegroups.com
Awesome :P  I've had so many problems in programming class with inaccuracies caused by Floats! 
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem